I\'m trying to create a new folder, but I can\'t figure out how to use createDirectoryAtPath correctly.
According to the documentation, this is the correct syntax:>
createDirectoryAtPath
expects a String
for the first parameter, not a URL. Try passing your path directly or use the URL-friendly variant createDirectoryForURL
.
Here is an example:
NSFileManager.defaultManager().createDirectoryAtPath("/tmp/fnord", withIntermediateDirectories: false, attributes: nil, error: nil)