我试图了解如何使用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)
}
Run Code Online (Sandbox Code Playgroud)
我无法理解如何访问bMutablePointer 的值.如果我想知道它是否设置YES或者NO怎么办?
swift ×1