CacheDeps import type {CacheDeps} from '@fuzdev/fuz_css/deps.js'; Cache-related file system deps. Abstracted to enable test isolation from the actual filesystem.
Named CacheDeps (not FsDeps) because it only covers
the specific deps needed for cache management, not general
filesystem access.
read_text
Reads a text file.
Returns a not_found error if the file doesn't exist.
type (options: { path: string; }): Promise<Result<{ value: string; }, FsError>>
options
{ path: string; }Promise<Result>write_text_atomic
Writes a text file atomically (temp file + rename for crash safety). Creates parent directories if they don't exist.
type (options: { path: string; content: string; }): Promise<Result<object, FsError>>
options
{ path: string; content: string; }Promise<Result>unlink
Removes a file. Returns a not_found error if the file doesn't exist -
callers that want rm -f semantics should ignore that kind explicitly.
type (options: { path: string; }): Promise<Result<object, FsError>>
options
{ path: string; }Promise<Result>