Featured Development Resources iOS Development Libraries Open Source iOS Libraries And Tools Swift

Files – An Open Source Swift Library For Working With Files And Folders

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()

You can find files on Github here.

A great Swift library for working with files.