753
return stat;
754
}
756
>
private validateReadFileLimits(resource: URI, size: number, options?: IReadFileStreamOptions): void {
757
if (typeof options?.limits?.size === 'number' && size > options.limits.size) {
758
throw new TooLargeFileOperationError(localize('fileTooLargeError', "Unable to read file '{0}' that is too large to open", this.resourceForError(resource)), FileOperationResult.FILE_TOO_LARGE, size, options);
759
}
760
}
762
>
//#endregion
763
>
764
>
//#region Move/Copy/Delete/Create Folder
765
>
766
>
async canMove(source: URI, target: URI, overwrite?: boolean): Promise<Error | true> {
767
return this.doCanMoveCopy(source, target, 'move', overwrite);
768
}
770
>
async canCopy(source: URI, target: URI, overwrite?: boolean): Promise<Error | true> {
771
return this.doCanMoveCopy(source, target, 'copy', overwrite);
772
}
774
>
private async doCanMoveCopy(source: URI, target: URI, mode: 'move' | 'copy', overwrite?: boolean): Promise<Error | true> {
775
if (source.toString() !== target.toString()) {
776
try {