C4iOS icon indicating copy to clipboard operation
C4iOS copied to clipboard

Add URL(), Path() methods

Open traviskirton opened this issue 8 years ago • 1 comments

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

Something like:

let url = URL("filename.txt")

let path = Path("filename.txt")

traviskirton avatar May 04 '16 03:05 traviskirton

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")

alejandro-isaza avatar May 04 '16 16:05 alejandro-isaza