Skip to content
0

katanakit-js / useEnsureDir

Function: useEnsureDir() ​

ts
function useEnsureDir(path): Promise<FilesystemResult<string>>;

Defined in: src/infrastructure/filesystem/filesystem.service.ts:358

Creates a directory (and any missing parents).

Parameters ​

ParameterTypeDescription
pathstringDirectory path to ensure.

Returns ​

Promise<FilesystemResult<string>>

Safe Result with the directory path.

Example ​

ts
await useEnsureDir("data/cache/books");

Released under the MIT License.