(filePath: string)
| 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 |
no test coverage detected