📜  如何快速清除文本文件代码示例

📅  最后修改于: 2022-03-11 15:01:00.244000             🧑  作者: Mango

代码示例1
let text = ""
do {
     try text.write(to: filePath, atomically: false, encoding: .utf8)
   } catch {
     print(error)
   }