MCPcopy Create free account
hub / github.com/Azure/powershell / isFolderExistAndWritable

Method isFolderExistAndWritable

lib/index.js:8472–8489  ·  view source on GitHub ↗
(folderPath)

Source from the content-addressed store, hash-verified

8470 return process.cwd();
8471 }
8472 static isFolderExistAndWritable(folderPath) {
8473 if (!folderPath) {
8474 return false;
8475 }
8476 if (!fs_1.default.existsSync(folderPath)) {
8477 return false;
8478 }
8479 if (!fs_1.default.lstatSync(folderPath).isDirectory()) {
8480 return false;
8481 }
8482 try {
8483 fs_1.default.accessSync(folderPath, fs_1.default.constants.W_OK);
8484 }
8485 catch (err) {
8486 return false;
8487 }
8488 return true;
8489 }
8490 static getLatestModule(moduleName) {
8491 return __awaiter(this, void 0, void 0, function* () {
8492 let output = "";

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected