Skip to content

virtual-file

Disposable, read-only files backed by memory instead of the vault adapter.

Interface Description
RegisterVirtualFileParams Parameters for registerVirtualFile.
VirtualFile A memory file and its lifetime. Dispose it before its owning plugin unloads.
Function Description
registerVirtualFile Registers immutable text as a file without writing to the adapter. The parent folder must exist. Markdown views are read-only; vault and adapter mutations of the path or its ancestors throw. Raw filesystem access and third-party views are outside this contract. Resource URLs use UTF-8 blobs. Disposing closes views of this file and revokes its URL. No create or delete events are emitted, so indexers and synchronization never treat it as a persisted file.