openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
15 lines (14 loc) • 398 B
JavaScript
import { t as hasErrnoCode } from "./errno-CkbDOfLk.js";
import fs from "node:fs";
//#region src/infra/path-existence.ts
/** Only a definite missing leaf permits callers to treat a path as absent. */
function pathMayExistSync(filePath) {
try {
fs.lstatSync(filePath);
return true;
} catch (error) {
return !hasErrnoCode(error, "ENOENT");
}
}
//#endregion
export { pathMayExistSync as t };