目录
目录README.md

PLFile

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

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

import PLFile

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.root
Path.home
Path.current
Path.temporary

Create, Write file and Folder!

let path = Path.home
let folder = try! PLFile.Folder(path: path)
let file = try! folder.createFile(at: Path("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.

关于
445.0 KB
邀请码