Files is an open source Swift library from John Sundell for working with files ion iOS, macOS and tvOS.
Files provides a straightforward object-oriented API for moving, deleting, reading, and writing files and folders.
This snippet from the readme shows an example of file and folder deletion and creation:
let folder = try Folder(path: "/users/john/folder")
let file = try folder.createFile(named: "file.json")
try file.write(data: wrap(object))
try file.delete()
try folder.delete()
let file = try folder.createFile(named: "file.json")
try file.write(data: wrap(object))
try file.delete()
try folder.delete()
You can find files on Github here.
A great Swift library for working with files.
Original article: Files – An Open Source Swift Library For Working With Files And Folders
©2017 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.
Reference source: iOS App Dev Libraries, Controls, Tutorials, Examples and Tools