URL and NSURL have this bizarre legacy behavior, where file:// URLs compute whether the URL represents a directory by doing file I/O, checking to see if the file is an actual, existing directory.
init(fileURLWithPath:) and appendingPathComponent(_:) are now deprecated, in favor of init(filePath:directoryHint:relativeTo:) and appending(path:directoryHint:) which accept an URL.DirectoryHint with the sane default of .inferFromPath (i.e. if the URL ends with a slash, it's a directory, and that's that).
Skip Foundation doesn't support the non-deprecated versions yet, but it should.
URLandNSURLhave this bizarre legacy behavior, wherefile://URLs compute whether the URL represents a directory by doing file I/O, checking to see if the file is an actual, existing directory.init(fileURLWithPath:)andappendingPathComponent(_:)are now deprecated, in favor ofinit(filePath:directoryHint:relativeTo:)andappending(path:directoryHint:)which accept anURL.DirectoryHintwith the sane default of.inferFromPath(i.e. if the URL ends with a slash, it's a directory, and that's that).Skip Foundation doesn't support the non-deprecated versions yet, but it should.