UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 780 B
import e from"node:path";import{hasNodeErrorCode as t,hasNodeErrorCode as n,isNodeError as r,isPathInside as i,normalizeWindowsPathForComparison as a}from"@openclaw/fs-safe/path";function isMissingPathError(e){return n(e,`ENOENT`)||n(e,`ENOTDIR`)||n(e,`not-found`)}function ignoreMissingPath(e){if(!n(e,`ENOENT`))throw e}function relativePathEscapesRoot(t){return t===`..`||t.startsWith(`../`)||t.startsWith(`..\\`)||e.isAbsolute(t)}function normalizeWindowsPathPreservingCase(t){let n=e.win32.normalize(t);if(!n.startsWith(`\\\\?\\`))return n;let r=n.slice(4);return r.toUpperCase().startsWith(`UNC\\`)?`\\\\${r.slice(4)}`:r}export{relativePathEscapesRoot as a,r as c,normalizeWindowsPathPreservingCase as i,isMissingPathError as l,i as n,n as o,a as r,ignoreMissingPath as s,t};