749
750
override async writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable, options?: IWriteFileOptions): Promise<IFileStatWithMetadata> {
752
>
753
>
if (this.writeShouldThrowError) {
754
throw this.writeShouldThrowError;
755
}
757
>
let content: VSBuffer;
758
>
if (bufferOrReadable instanceof VSBuffer) {
759
>
content = bufferOrReadable;
760
>
} else {
761
content = readableToBuffer(bufferOrReadable);
762
}
764
>
// Store in memory and track
765
>
this.files.set(resource, content);
766
>
this.writeOperations.push({ resource, content: content.toString() });
767
>
768
>
return createFileStat(resource, this.readonly);
769
>
}
770
771
override async del(resource: URI, _options?: { useTrash?: boolean; recursive?: boolean }): Promise<void> {