Skip to content

UseRemoveDir

katanakit-js / useRemoveDir

function useRemoveDir(path, options?): Promise<FilesystemResult<string>>;

Defined in: infrastructure/filesystem/filesystem.service.ts:497

Removes a directory tree. Recursive by default; force: false surfaces ENOENT instead of ignoring missing paths.

Parameter Type Description
path string Directory path to remove.
options? { force?: boolean; recursive?: boolean; } recursive (default true) and force (default false).
options.force? boolean -
options.recursive? boolean -

Promise<FilesystemResult<string>>

Safe Result with the removed path.

await useRemoveDir("data/cache");