Passes the URL’s path in the file system representation to a closure.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
A closure to execute, which receives a C string as its parameter, and returns a value of a type you choose.
The parameter passed to the closure is
nilif the URL cannot be represented by the file system. For example, if the URL contains an accented character and the file system only supports ASCII, no file system representation is possible.
The value returned by your closure, if any.
The file system representation is a null-terminated C string with canonical UTF-8 encoding.