I noticed a new signature for functionFileManager.fileExists : FileManager.fileExists(atPath path: String, isDirectory: inout Bool) -> Bool which is Swift-friendly and not use ObjCBool anymore.
But when I try to use is with the latest Swift 6 snaphot, it fails with
$ swift --version
Apple Swift version 6.0-dev (LLVM c3efe9282719c35, Swift b163fed2b3101e0)
Target: arm64-apple-macosx14.0
$ swift build
45 | var isDirectory: Bool
46 | if FileManager.default.fileExists(atPath: localDepsPath, isDirectory: &isDirectory) {
| |- error: cannot convert value of type 'UnsafeMutablePointer<Bool>' to expected argument type 'UnsafeMutablePointer<ObjCBool>'
| `- note: arguments to generic parameter 'Pointee' ('Bool' and 'ObjCBool') are expected to be equal
This is a question, not an issue.
I noticed a new signature for function
FileManager.fileExists
:FileManager.fileExists(atPath path: String, isDirectory: inout Bool) -> Bool
which is Swift-friendly and not useObjCBool
anymore.But when I try to use is with the latest Swift 6 snaphot, it fails with
How can we take advantage of this new function ?