import { FrontmatterHandler } from './frontmatter.js'; import { PathFilter } from './pathfilter.js'; import type { ParsedNote, DirectoryListing, NoteWriteParams, DeleteNoteParams, DeleteResult, MoveNoteParams, MoveFileParams, MoveResult, BatchReadParams, BatchReadResult, UpdateFrontmatterParams, NoteInfo, TagManagementParams, TagManagementResult, PatchNoteParams, PatchNoteResult, VaultStats } from './types.js'; /** * Map a filesystem write failure to a clear, accurate Error. * * Classifies by the Node error `code`, NOT by message substring. The old * substring matching (`message.includes('space')`) mislabeled any error whose * message merely contained "space" as a disk-full error, producing false * "No space left on device" reports (#109). Errors we threw ourselves with a * meaningful message (no `code`) pass through unchanged. */ export declare function classifyWriteError(error: unknown, path: string): Error; export declare class FileSystemService { private vaultPath; private frontmatterHandler; private pathFilter; constructor(vaultPath: string, pathFilter?: PathFilter, frontmatterHandler?: FrontmatterHandler); /** * Normalize an incoming path to be vault-relative. Strips leading slashes * and the vault path prefix when a caller accidentally passes an absolute path * (e.g. "/Users/me/vault/wiki/note.md" instead of "wiki/note.md"). */ private normalizePath; private resolvePath; readNote(path: string): Promise; writeNote(params: NoteWriteParams): Promise; patchNote(params: PatchNoteParams): Promise; listDirectory(path?: string): Promise; exists(path: string): Promise; isDirectory(path: string): Promise; deleteNote(params: DeleteNoteParams): Promise; moveNote(params: MoveNoteParams): Promise; moveFile(params: MoveFileParams): Promise; readMultipleNotes(params: BatchReadParams): Promise; updateFrontmatter(params: UpdateFrontmatterParams): Promise; getNotesInfo(paths: string[]): Promise; manageTags(params: TagManagementParams): Promise; getVaultPath(): string; /** * Resolve an Obsidian wiki link name to its vault-relative paths. * Scans the vault for exact filename matches (name + .md). * * A name containing `/` is path-qualified (Obsidian emits these when a * basename is ambiguous, e.g. [[folder/Note]]): it must match the full * vault-relative path instead of just the basename. * * Returns all matches sorted root-first (by path depth ascending), with * alphabetical tiebreak at equal depth. Empty array on zero matches. * The caller decides how to handle zero/single/multi — this function does * not throw on lookup outcomes. * * Throws only on caller misuse (empty name). */ findPathForWikiLink(wikiLinkName: string): Promise; getVaultStats(recentCount?: number): Promise; listAllTags(): Promise>; } //# sourceMappingURL=filesystem.d.ts.map