MCPcopy Create free account
hub / github.com/stenciljs/core / commitWriteFile

Function commitWriteFile

src/compiler/sys/in-memory-fs.ts:943–956  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

941 * @returns a Promise wrapping the written path
942 */
943 const commitWriteFile = async (filePath: string): Promise<string> => {
944 const item = getItem(filePath);
945
946 if (item.fileText == null) {
947 throw new Error(`unable to find item fileText to write: ${filePath}`);
948 }
949 await sys.writeFile(filePath, item.fileText);
950
951 if (item.useCache === false) {
952 clearFileCache(filePath);
953 }
954
955 return filePath;
956 };
957
958 /**
959 * Commit file delete operations to disk

Callers 1

commitWriteFilesFunction · 0.85

Calls 3

getItemFunction · 0.85
clearFileCacheFunction · 0.85
writeFileMethod · 0.80

Tested by

no test coverage detected