Skip to content

assertDirectoryExists

Assert that a filesystem path exists and is a directory.

import { assertDirectoryExists } from "@kensio/smartass";
const directoryPath = "src";
assertDirectoryExists(directoryPath);
// This validates the directory at runtime without changing the path type.

Source file: src/assert/directory-exists/directory-exists.assert.ts