相关疑难解决方法(0)

NSFileManager fileExistsAtPath:isDirectory和swift

我试图了解如何使用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

66
推荐指数
4
解决办法
3万
查看次数

标签 统计

swift ×1