You’re using wrong function name or wrong parameter type.
There is no such function as app.vault.adapter.modify, and the vault methods (app.vault.xxx) expects TFile
instead of a string path.
Just take a look at the Obsidian API docs, it has comprehensive list of available methods and corresponding parameter types:
app.vault.<METHOD>
: Vault - Developer Documentationapp.vault.adapter<METHOD>
:DataAdapter - Developer Documentation
Use Vault
if possible. (The only scenarios where you should use adapter
that I can come up with are when dealing with hidden files, files in hidden folders such as .obsidian
)