VaultAdapter
API reference uses a reviewed source snapshot. Source links open the published source; unverified line locations are omitted.
Defined in: storage/fs.ts:284
Preferred name for the canonical vault file adapter contract.
DataAdapter remains exported for Obsidian API compatibility while the
runtime migrates toward the cross-host vault session model.
Extends
Section titled “Extends”Methods
Section titled “Methods”append()
Section titled “append()”append(
normalizedPath,data,options?):Promise<void>
Defined in: storage/fs.ts:226
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
string
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”appendBinary()
Section titled “appendBinary()”appendBinary(
normalizedPath,data,options?):Promise<void>
Defined in: storage/fs.ts:231
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
ArrayBuffer
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”atomicWrite()?
Section titled “atomicWrite()?”
optionalatomicWrite(normalizedPath,source,options?):Promise<void>
Defined in: storage/fs.ts:303
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
source
Section titled “source”ReadableStream<Uint8Array<ArrayBufferLike>>
options?
Section titled “options?”AtomicDataWriteOptions
Returns
Section titled “Returns”Promise<void>
copy()
Section titled “copy()”copy(
normalizedPath,normalizedNewPath):Promise<void>
Defined in: storage/fs.ts:261
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
normalizedNewPath
Section titled “normalizedNewPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”exists()
Section titled “exists()”exists(
normalizedPath,sensitive?):Promise<boolean>
Defined in: storage/fs.ts:212
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
sensitive?
Section titled “sensitive?”boolean
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”getCapabilities()?
Section titled “getCapabilities()?”
optionalgetCapabilities():Partial<VaultAdapterCapabilities>
Defined in: storage/fs.ts:285
Returns
Section titled “Returns”Partial<VaultAdapterCapabilities>
getName()
Section titled “getName()”getName():
string
Defined in: storage/fs.ts:211
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”getResourcePath()
Section titled “getResourcePath()”getResourcePath(
normalizedPath):string
Defined in: storage/fs.ts:262
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”list()
Section titled “list()”list(
normalizedPath):Promise<ListedFiles>
Defined in: storage/fs.ts:253
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<ListedFiles>
Inherited from
Section titled “Inherited from”mkdir()
Section titled “mkdir()”mkdir(
normalizedPath,options?):Promise<void>
Defined in: storage/fs.ts:254
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
options?
Section titled “options?”Partial<{ mode: string; recursive: boolean; }>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”openRead()?
Section titled “openRead()?”
optionalopenRead(normalizedPath):Promise<VaultReadHandle>
Defined in: storage/fs.ts:302
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<VaultReadHandle>
process()
Section titled “process()”process(
normalizedPath,fn,options?):Promise<string>
Defined in: storage/fs.ts:248
Atomically read, modify, and save the contents of a plaintext file.
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Path to file/folder, use normalizePath to normalize beforehand.
(data) => string
A callback function which returns the new content of the file synchronously.
options?
Section titled “options?”Partial<FileProperties>
Write options.
Returns
Section titled “Returns”Promise<string>
String - the text value of the file that was written.
Inherited from
Section titled “Inherited from”read()
Section titled “read()”read(
normalizedPath):Promise<string>
Defined in: storage/fs.ts:214
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”readBinary()
Section titled “readBinary()”readBinary(
normalizedPath):Promise<ArrayBuffer>
Defined in: storage/fs.ts:215
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<ArrayBuffer>
Inherited from
Section titled “Inherited from”remove()
Section titled “remove()”remove(
normalizedPath):Promise<void>
Defined in: storage/fs.ts:259
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”rename()
Section titled “rename()”rename(
normalizedPath,normalizedNewPath):Promise<void>
Defined in: storage/fs.ts:260
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
normalizedNewPath
Section titled “normalizedNewPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”rmdir()
Section titled “rmdir()”rmdir(
normalizedPath,recursive):Promise<void>
Defined in: storage/fs.ts:258
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
recursive
Section titled “recursive”boolean
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”stat()
Section titled “stat()”stat(
normalizedPath):Promise<Stat|null>
Defined in: storage/fs.ts:213
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<Stat | null>
Inherited from
Section titled “Inherited from”trashLocal()
Section titled “trashLocal()”trashLocal(
normalizedPath):Promise<void>
Defined in: storage/fs.ts:264
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”trashSystem()
Section titled “trashSystem()”trashSystem(
normalizedPath):Promise<boolean>
Defined in: storage/fs.ts:263
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”write()
Section titled “write()”write(
normalizedPath,data,options?):Promise<void>
Defined in: storage/fs.ts:216
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
string
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”writeBinary()
Section titled “writeBinary()”writeBinary(
normalizedPath,data,options?):Promise<void>
Defined in: storage/fs.ts:221
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
ArrayBuffer
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”writeExclusive()?
Section titled “writeExclusive()?”
optionalwriteExclusive(normalizedPath,data,options?):Promise<void>
Defined in: storage/fs.ts:287
Publish new complete bytes without replacing an existing destination.
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
string | ArrayBuffer
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>
writeTextIfUnchanged()?
Section titled “writeTextIfUnchanged()?”
optionalwriteTextIfUnchanged(normalizedPath,data,expected,options?):Promise<void>
Defined in: storage/fs.ts:296
Reject when the file no longer has these exact contents (null means absent).
Parameters
Section titled “Parameters”normalizedPath
Section titled “normalizedPath”string
string
expected
Section titled “expected”string | null
options?
Section titled “options?”Partial<FileProperties>
Returns
Section titled “Returns”Promise<void>