Reputation: 4521
I've created a folder in the left pane, which holds various images. It's called "wikiImages". How do I access this folder or get the path to this folder?
I found Bundle.main.resourcePath!
, but this seems to access all assets.
Is there a way to access the path to the folder "wikiImages'?
Upvotes: 0
Views: 86
Reputation: 89549
Assuming wikiImages
lives inside your application bundle's resources folder, you can do something like:
if let resourceFolderURL = Bundle.main.resourceURL {
let wikiFolderURL = resourceFolderURL.appendingPathComponent("wikiImages")
}
Like as described in this very related question.
Upvotes: 2