@stryke/path
Version:
A package containing various utilities that expand the functionality of NodeJs's built-in `path` module
14 lines (13 loc) • 382 B
JavaScript
//#region src/is-root-dir.ts
/**
* Check if the directory is the current system's root directory.
*
* @param dir - The directory to check.
* @returns Returns true if the directory is the root directory.
*/
function isSystemRoot(dir) {
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
}
//#endregion
export { isSystemRoot };
//# sourceMappingURL=is-root-dir.mjs.map