I'm trying to understand how to use the function fileExistsAtPath:isDirectory:
with Swift but I get completely lost.
This is my code example:
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)
}
I can't understand how can I access the value for the b
MutablePointer. What If I want to know if it set to YES
or NO
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…