in src/cloudShell.ts [50:74]
public async deleteFiles(files: vscode.Uri[]): Promise<void> {
const RETRY_TIMES = 3;
if (!await this.connectedToCloudShell()) {
terraformChannel.appendLine(`cloud shell can not be opened, file deleting operation is not synced`);
return;
}
for (const file of files.map((a) => a.fsPath)) {
for (let i = 0; i < RETRY_TIMES; i++) {
try {
terraformChannel.appendLine(`Deleting file ${file} from cloud shell`);
await azFileDelete(
vscode.workspace.getWorkspaceFolder(vscode.Uri.file(file)).name,
this.storageAccountName,
this.storageAccountKey,
this.fileShareName,
file);
break;
} catch (err) {
terraformChannel.appendLine(err);
}
}
}
}