Skip to content
New issue

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

Add URL(), Path() methods #662

Open
traviskirton opened this issue May 4, 2016 · 1 comment
Open

Add URL(), Path() methods #662

traviskirton opened this issue May 4, 2016 · 1 comment

Comments

@traviskirton
Copy link
Collaborator

Simplified version of NSBundle.mainBundle().urlForResource("filename", withExtension:".txt")

Something like:

let url = URL("filename.txt")

let path = Path("filename.txt")

@alejandro-isaza
Copy link
Member

I think this may be confusing if you are trying to create a file, since you can never create a file in a bundle. What about let url = URL(forFileInMainBundle: "filename.txt"). Also I feel like this may be outside our scope. I'd prefer something like let movie = Movie(loadFromMainBundle: "movie.mp4")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants