localbackup
Version:
Utility to make local backups easily and without the hassle.
19 lines • 586 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDir = void 0;
const node_fs_1 = __importDefault(require("node:fs"));
function isDir(path) {
try {
const stat = node_fs_1.default.lstatSync(path);
return stat.isDirectory();
}
catch (e) {
// lstatSync throws an error if path doesn't exist
return false;
}
}
exports.isDir = isDir;
//# sourceMappingURL=isDir.js.map