Skip to content

Is it possible to create a new folder, or does move do this automatically? #333

Answered by welpdx
mttjhn asked this question in Help
Discussion options

You must be logged in to vote

Hey guys,

If you need to create a new folder, why not try the createFolder() function in the Obsidian Api? (It is referenced on line 1004)

You can check if path exists. If it doesn't, do:

await this.app.vault.createFolder("/foo/bar/")

Hope that helps,

Welp~

Edit: something o.o

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@mttjhn
Comment options

@welpdx
Comment options

@Smitty010
Comment options

@Fenrihr
Comment options

Answer selected by mttjhn
Comment options

You must be logged in to vote
1 reply
@Zachatoo
Comment options

Zachatoo May 4, 2024
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants