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
I don't know about Swift 2.3, but I think the syntax for escaping a keyword hasn't changed. After all, it's not a major update.
You can use the
`character to escape a keyword so as to use the keyword as an identifier for a variable, method or something else. So you can do this do create a variable namedvar:So if you just write:
it should work.
btw I just looked up
NSFileManagerin the docs. And I found that there is nodefault()method. Is the docs outdated or something?