Skip to content

Add support for URL directory hints #120

@dfabulich

Description

@dfabulich

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions