Answers for "swift getting empty data from file"

0

how to clear text file swift

let text = ""
do {
     try text.write(to: filePath, atomically: false, encoding: .utf8)
   } catch {
     print(error)
   }
Posted by: Guest on October-20-2020

Code answers related to "swift getting empty data from file"

Code answers related to "Swift"

Browse Popular Code Answers by Language