Tôi đang cố gắng hiểu cách sử dụng hàm fileExistsAtPath:isDirectory:
với Swift nhưng tôi hoàn toàn bị lạc.
Đây là ví dụ mã của tôi:
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)
}
Tôi không hiểu làm cách nào tôi có thể truy cập giá trị cho b
MutablePointer. Điều gì Nếu tôi muốn biết nếu nó được đặt thành YES
hoặc NO
?