Skip to content

pelagornis/plfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLFile

Official SPM Swift License Platform

📁 Pelagornis File Management Library

Installation

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.8")
    ],
    ...
)

Then import the PLFile from thr location you want to use.

import File

Documentation

The documentation for releases and main are available here:

Using

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

License

PLFile is under MIT license. See the LICENSE file for more info.