public async Task DeleteFileAsync(String filename) { ShareDirectoryClient raiz = this.cliente.GetRootDirectoryClient(); ShareFileClient file = raiz.GetFileClient(filename); await file.DeleteAsync(); }
public async Task DeleteFile(string fileShare, string fileName) { ShareClient share = new ShareClient(connectionString, fileShare); if (!share.Exists()) { Exception error = new Exception($"Fileshare {fileShare} does not exist "); throw error; } ShareDirectoryClient rootDir = share.GetRootDirectoryClient(); ShareFileClient file = rootDir.GetFileClient(fileName); if (file.Exists()) { await file.DeleteAsync(); } else { Exception error = new Exception($"File {fileName} does not exist in Azure storage "); throw error; } }
public async Task DeleteFileAsync(String nombre) { ShareFileClient archivo = this.root.GetFileClient(nombre); await archivo.DeleteAsync(); }
public async Task DeleteFileAsync(String filename) { ShareFileClient file = this.root.GetFileClient(filename); await file.DeleteAsync(); }