Я намагаюся зрозуміти, як використовувати функцію 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)
}
Я не можу зрозуміти, як я можу отримати доступ до значення для bMutablePointer. Що робити, якщо я хочу знати, встановлено значення YESчи NO?