我试图了解如何在fileExistsAtPath:isDirectory:
Swift中使用该函数,但是我完全迷路了。
这是我的代码示例:
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
orNO
怎么办?