SkillAgentSearch skills...

Warehouse

Easy NSFileManager

Install / Use

/learn @muukii/Warehouse
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Warehouse:beers:

You can use easily NSFileManager.

How to use

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.

let warehouseForImage = Warehouse()
let warehouseForAudio = Warehouse()
let warehouseForMovie = Warehouse()
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

}
View on GitHub
GitHub Stars13
CategoryDevelopment
Updated10y ago
Forks0

Languages

Swift

Security Score

70/100

Audited on Mar 31, 2016

No findings