The problem is that isDirectory
is UnsafeMutablePointer<ObjCBool>
and not UnsafeMutablePointer<Bool>
you provide. You can use the following code:
var isDir = ObjCBool(false)if NSFileManager.defaultManager().fileExistsAtPath("", isDirectory: &isDir) {}if isDir.boolValue {}