我试图理解如何使用函数 fileExistsAtPath:isDirectory:
与斯威夫特,但我完全迷路了。
下面是我的代码示例:
var b:CMutablePointer<ObjCBool>?
if (fileManager.fileExistsAtPath(fullPath, isDirectory:b! )){
// how can I use the "b" variable?!
fileManager.createDirectoryAtURL(dirURL, withIntermediateDirectories: false, attributes: nil, error: nil)
}
我不能理解如何访问 b
MutablePointer 的值。如果我想知道它是否设置为 YES
或 NO
?