-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TestCode And ReadMeFile And Source Update
gp
- Loading branch information
Showing
4 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,52 @@ | ||
# PLFile | ||
|
||
A description of this package. | ||
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. | ||
```swift | ||
let package = Package( | ||
... | ||
dependencies: [ | ||
.package(url: "https://github.com/Pelagornis/PLFile.git", from: "1.0.0") | ||
], | ||
... | ||
) | ||
``` | ||
Then import the PLFile from thr location you want to use. | ||
|
||
```swift | ||
import PLFile | ||
``` | ||
|
||
## Using | ||
|
||
Path Setting. | ||
```swift | ||
let path = Path("/Users/ji-hoonahn/Desktop/") // example | ||
``` | ||
|
||
Easy access path. | ||
```swift | ||
Path.root | ||
Path.home | ||
Path.current | ||
Path.temporary | ||
``` | ||
|
||
Create, Write file and Folder! | ||
```swift | ||
let folder = try! PLFile.Folder(path: .home) | ||
let file = try! folder.createFile(at: Path("test.swift")) | ||
try! file.write("print(1)") | ||
``` | ||
|
||
And you can delete files and folders if you want. | ||
|
||
```swift | ||
try! file.delete() | ||
try! folder.delete() | ||
``` | ||
|
||
## License | ||
**PLFile** is under MIT license. See the [LICENSE](LICENSE) file for more info. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters