Is it possible/when will it be possible to access search programmatically?

I tried to search for this but couldn’t find any info about this. Right now the api seems to only offer the method this.app.vault.getFiles() to access all files in a vault, however it would be nice to filter and search for files. I could imagine that a search query string could also be used programmatically (something like this.app.vault.search(searchString) that would return an array of file objects), however this seems not to be available.

How do other people slice and dice files of a vault?

1 Like

I will also provide a use case here: Complex file exclusions. Only do something if a file is in the search results for a certain search (or only do something if it is not in the results).

1 Like