Last active
October 15, 2019 06:06
-
-
Save andrewwoz/ae615cb03ce2467bf0f03106783efcce to your computer and use it in GitHub Desktop.
[Remove item from file system in swift] #fs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fs = FileManager.default | |
guard let documents = fs.urls(for: .documentDirectory, in: .userDomainMask).first else { | |
return | |
} | |
try? fs.removeItem(at: documents.appendingPathComponent("hello.txt")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment