Skip to content

assertPathExists

Assert that a filesystem path exists.

import { assertPathExists } from "@kensio/smartass";
const filePath = "README.md";
assertPathExists(filePath);
// This validates the path at runtime without changing the path type.

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