📁 Pelagornis File Management Library
PLFile was deployed as Swift Package Manager. Package to install in a project. Add as a dependent item within the swift manifest.
let package = Package(
...
dependencies: [
.package(url: "https://github.com/pelagornis/plfile.git", from: "1.0.7")
],
...
)
Then import the PLFile from thr location you want to use.
import File
The documentation for releases and main
are available here:
Path Setting.
let path = Path("/Users/ji-hoonahn/Desktop/") // example
Easy access path.
Path.current
Path.root
Path.library
Path.temporary
Path.home
Path.documents
Create, Write file and Folder!
let path = Path.home
let folder = try? Folder(path: path)
let file = try? folder.createFile(at: "test.swift")
try? file.write("print(1)")
And you can delete files and folders if you want.
try? file.delete()
try? folder.delete()
PLFile is under MIT license. See the LICENSE file for more info.