Swiftpack.co - pelagornis/PLFile as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by pelagornis.
pelagornis/PLFile 1.0.2
File Management Library
⭐️ 3
🕓 1 week ago
macOS
.package(url: "https://github.com/pelagornis/PLFile.git", from: "1.0.2")

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.

GitHub

link
Stars: 3
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

PLFile v1.0.2
1 week ago

What's Changed

  • Changed: Swift 5.8 -> 5.7
  • Support: Docc

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics