Moondra
Moondra

Reputation: 4521

How does one access the path to a created folder in Navigation pane (left pane)?

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

Answers (1)

Michael Dautermann
Michael Dautermann

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

Related Questions