API for special files in vault

Hi Obsidian team,

As I’m working on a plugin, I would like to be able to detect, read and write to special files in the vault. That is files like .stignore which are special for syncing files across devices. In this case, it allows for adding ignoring patterns to not sync any files that match those patterns, similarly to .gitignore file.

Therefore, would it be possible to add a method in the official Obsidian API for accessing those special files starting with . (for example) ?

I am suggesting a similar method as this.app.vault.getAllLoadedFiles() or this.app.vault.getFileByPath so that these methods could support searching for files starting with a special character like . or others. (don’t know if there are other usecases)

Thanks for considering it !

The Adapter API can read those files:

1 Like

It works perfectly, thanks a lot ! :pray:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.