FileSugar is a Swift package that provides a simple API for working with files. It allows you to easily open, save, delete, and create files.
- Open, save, delete, and create files
- Simple API for working with files
You can install FileSugar using Swift Package Manager. Simply add the following line to your Package.swift
file:
.package(url: "https://github.com/eonist/FileSugar.git", .branch("master"))
### Usage
Here are some examples of how to use FileSugar:
```swift
// Write to a file
FileModifier.write("~/Desktop/temp.txt".tildePath, "test")
// Check if a file exists
FileAsserter.exists("~/Desktop/temp.txt".tildePath) // Output: true
// Read the contents of a file
FileParser.content("~/Desktop/temp.txt".tildePath) // Output: test
If you find a bug or have a feature request, please open an issue on GitHub. Pull requests are also welcome!
FileSugar is available under the MIT license. See the LICENSE file for more info.
- Add test file in spm resource .bundle
- Move FileStreamer into it's own repo again?
- Add more examples to readme?