src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.ts/DeleteOperation/perform
class DeleteOperation:	async perform(token: CancellationToken): Promise<IFileOperation> {
		// delete file

		const deletes: IDeleteOperation[] = [];
		const undoes: CreateEdit[] = [];

		for (const edit of this._edits) {
			let fileStat: IFileStatWithMetadata | undefined;
			try {
				fileStat = await this._fileService.resolve(edit.oldUri, { resolveMetadata: true });
			} catch (err) {
				if (!edit.options.ignoreIfNotExists) {
					throw new Error(`${edit.oldUri} does not exist and can not be deleted`);
				}
				continue;
			}

			deletes.push({
				resource: edit.oldUri,
				recursive: edit.options.recursive,
				useTrash: !edit.options.skipTrashBin && this._fileService.hasCapability(edit.oldUri, FileSystemProviderCapabilities.Trash) && this._configurationService.getValue<boolean>('files.enableTrash')
			});


			// read file contents for undo operation. when a file is too large it won't be restored
			let fileContent: IFileContent | undefined;
			if (!edit.undoesCreate && !edit.options.folder && !(typeof edit.options.maxSize === 'number' && fileStat.size > edit.options.maxSize)) {
				try {
					fileContent = await this._fileService.readFile(edit.oldUri);
				} catch (err) {
					this._logService.critical(err);
				}
			}
			if (fileContent !== undefined) {
				undoes.push(new CreateEdit(edit.oldUri, edit.options, fileContent.value));
			}
		}

		if (deletes.length === 0) {
			return new Noop();
		}

		await this._workingCopyFileService.delete(deletes, token, this._undoRedoInfo);

		if (undoes.length === 0) {
			return new Noop();
		}
		return this._instaService.createInstance(CreateOperation, undoes, { isUndoing: true });
	}