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.
See Question&Answers more detail:osI'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.
See Question&Answers more detail:osMy understanding is that you are trying to create a directory programmatically using swift. The code given below does the same.
var err: NSErrorPointer = nil
let manager = NSFileManager.defaultManager()
manager.createDirectoryAtPath("/Users/abc/Desktop/swiftDir", withIntermediateDirectories: true, attributes: nil, error: err)