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

Method deleteFile

lib/index.js:8173–8184  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

8171 return `${(0, uuid_1.v4)()}.ps1`;
8172 }
8173 static deleteFile(filePath) {
8174 return __awaiter(this, void 0, void 0, function* () {
8175 if (fs.existsSync(filePath)) {
8176 try {
8177 fs.unlinkSync(filePath);
8178 }
8179 catch (err) {
8180 core.warning(err.toString());
8181 }
8182 }
8183 });
8184 }
8185 static pathExists(path) {
8186 return fs.existsSync(path);
8187 }

Callers 3

tryInstallFromZipMethod · 0.45
mainFunction · 0.45

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected