Skip to content

ExternalFileManager

Unofficial

Resolves and monitors files outside the vault.

Import:

import type { ExternalFileManager } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ExternalFileManager

Properties

PropertyTypeDescription
filesMap<string, ExternalFileMonitor>Monitors keyed by normalized absolute filesystem paths.
fstypeof fsThe desktop original-fs module.
intervalnull | ReturnType<typeof setInterval>Periodic cleanup timer, or null when inactive.
pathtypeof pathThe filesystem path module.
vaultVaultThe owning vault.

Methods

MethodReturnsDescription
cleanup()voidRemoves monitors whose weak file references have expired.
getExternalFile(path)null | TExternalFileResolves an external path and creates a file and monitor when necessary.
getLoadedFile(path)null | TExternalFileLooks up an existing file without creating a monitor.
rename(file, path)Promise<void>Renames a monitored external file and updates its monitor and vault path.

Links to this page: