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

Method createScriptFile

lib/index.js:8162–8169  ·  view source on GitHub ↗
(inlineScript)

Source from the content-addressed store, hash-verified

8160const uuid_1 = __nccwpck_require__(2048);
8161class FileUtils {
8162 static createScriptFile(inlineScript) {
8163 return __awaiter(this, void 0, void 0, function* () {
8164 const fileName = FileUtils.getFileName();
8165 const filePath = path.join(FileUtils.tempDirectory, fileName);
8166 fs.writeFileSync(filePath, inlineScript, 'utf-8');
8167 return filePath;
8168 });
8169 }
8170 static getFileName() {
8171 return `${(0, uuid_1.v4)()}.ps1`;
8172 }

Callers 1

executeFileMethod · 0.45

Calls 1

getFileNameMethod · 0.45

Tested by

no test coverage detected