I\'m new to swift and I\'m not sure how to make a new folder from a string path (or from some kind of File/ NSFile object)
This is on OS X with Cocoa.>
In Swift 2.0 you must use the new style for error handling:
let path: String = "/Users/abc/Desktop/swiftDir"
let fileManager = NSFileManager.defaultManager()
do
{
try fileManager.createDirectoryAtPath(path, withIntermediateDirectories: true, attributes: nil)
}
catch let error as NSError
{
print("Error while creating a folder.")
}