NSFileManager
has been renamed to FileManager in Swift 2.3
onwards. So do the
defaultManager
class method which now just default
However when I use.
FileManager.default()
Compiler mis-icntepret and throw error.
default label can only appear in switch statement
Swift 2.3 and Xcode 8 beta 3
This problem is fixed in Swift 3, and the backticks are no longer necessary. Note that the default manager is now a class property rather than a class method. So the correct syntax is: