Created
August 23, 2018 02:58
-
-
Save jayz5/c4ac8ff3f9bdb67540561102592dcd49 to your computer and use it in GitHub Desktop.
This file contains 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
func deleteDocFile(fileName: String) { | |
guard let docDir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { return } | |
let fileURL = docDir.appendingPathComponent(fileName) | |
print("deleting file url: ", fileURL) | |
try? FileManager.default.removeItem(at: fileURL) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment