An open API service indexing awesome lists of open source software.

https://github.com/muukii/warehouse

Easy NSFileManager
https://github.com/muukii/warehouse

Last synced: about 2 months ago
JSON representation

Easy NSFileManager

Awesome Lists containing this project

README

        

# Warehouse:beers:

You can use easily NSFileManager.

## How to use

```swift
var path = Warehouse.documentDirectoryPath()
path = path + "/hey/hey.txt"

let warehouse = Warehouse()
warehouse.subDirectoryPath = "/Test"

warehouse.saveFile(fileName: "Muukii", contents: NSData(), success: { (savedRelativePath) -> Void in

}) { (error) -> Void in

}
```

### Generate Warehouse instance for each category.

```swift
let warehouseForImage = Warehouse()
let warehouseForAudio = Warehouse()
let warehouseForMovie = Warehouse()
```

```swift
warehouseForImage.saveFile(fileName: "imageFile", contents: NSData(), success: { (savedRelativePath) -> Void in

}) { (error) -> Void in

}

warehouseForAudio.saveFile(fileName: "audioFile", contents: NSData(), success: { (savedRelativePath) -> Void in

}) { (error) -> Void in

}
```