I\'m trying to understand how to use the function fileExistsAtPath:isDirectory: with Swift but I get completely lost.
fileExistsAtPath:isDirectory:
This is my code example:
Just to overload the bases. Here is mine that takes a URL
extension FileManager { func directoryExists(atUrl url: URL) -> Bool { var isDirectory: ObjCBool = false let exists = self.fileExists(atPath: url.path, isDirectory:&isDirectory) return exists && isDirectory.boolValue } }