We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e.g. changing myfile.jpg to myfile.zip. Particularly useful for "file" URLs.
Possibly implement with an extension on String? Extensions can be useful anywhere inside a path, for example:
String
let url = WebURL("file:///Applications/MyApp.app/Contents/Resources/foo")! if let appBundleDirIdx = url.pathComponents.lastIndex(where: { $0.fileExtension == "app" }) { let pathInsideBundleIdx = url.pathComponents.index(after: appBundleDirIdx) let pathInsideBundle = url.pathComponents[pathInsideBundleIdx...] // "/Contents/Resources/foo" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
e.g. changing myfile.jpg to myfile.zip. Particularly useful for "file" URLs.
Possibly implement with an extension on
String
? Extensions can be useful anywhere inside a path, for example:The text was updated successfully, but these errors were encountered: