ExternalFileManager
Unofficial
Resolves and monitors files outside the vault.
Import:
import type { ExternalFileManager } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface ExternalFileManagerProperties
| Property | Type | Description | |
|---|---|---|---|
| files | Map<string, ExternalFileMonitor> | Monitors keyed by normalized absolute filesystem paths. | |
| fs | typeof fs | The desktop original-fs module. | |
| interval | null | ReturnType<typeof setInterval> | Periodic cleanup timer, or null when inactive. | |
| path | typeof path | The filesystem path module. | |
| vault | Vault | The owning vault. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| cleanup() | void | Removes monitors whose weak file references have expired. | |
| getExternalFile(path) | null | TExternalFile | Resolves an external path and creates a file and monitor when necessary. | |
| getLoadedFile(path) | null | TExternalFile | Looks 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: