API: Get the directory of the 'Default location for new attachments' setting

This is already there, just not documented in the spec.

This function would give you the exact location where to save a specific attachement according to the setting:
https://github.com/kometenstaub/linked-data-helper/blob/f0704cfda75e8a98ac29d52a7490a77053a41f8d/src/interfaces.ts#L26

You can also acess the raw settings value with:
this.app.vault.getConfig("attachmentFolderPath")
Using this value can be dangerous, the returned value might be a bit unexpected depending on what the setting is set to, better to use the other method if possible.

3 Likes