There are several suggested methods for app.vault.adapter: getBasePath, getFullPath, getRealPath, getFullRealPath. What are the differences between them?
app.vault.adapter.getResourcePath("foo")
"app://local/D%3A%5CQu%E1%BA%A3%20C%E1%BA%A7u%5CB%20N%E1%BB%99i%20dung%5CKnowledge%20graphs%5CC%C3%A2y%20v%E1%BA%A5n%20%C4%91%E1%BB%81%5Cfoo?1645084573664"
app.vault.adapter.getBasePath("foo")
"D:\Quả Cầu\B Nội dung\Knowledge graphs\Cây vấn đề"
app.vault.adapter.getFullPath("foo")
"D:\Quả Cầu\B Nội dung\Knowledge graphs\Cây vấn đề\foo"
app.vault.adapter.getRealPath("foo")
"foo"
app.vault.adapter.getFullRealPath("foo")
"D:\Quả Cầu\B Nội dung\Knowledge graphs\Cây vấn đề\foo"
The official doc doesn’t explain much.
In the Discord @pjeby says:
getResourcePath() converts a vault-relative path to a URL that can be used to access the file from the HTML, e.g. to load as a <script> tag, <iframe>, <img>, etc. You only need it if you specifically need the browser to load it in some way
I put the outcome in my browser, but it just read it as a query for google (meaning that it doesn’t understand that it’s a link).