コード例 #1
0
        public async Task DeleteFileAsync(String filename)
        {
            ShareDirectoryClient raiz = this.cliente.GetRootDirectoryClient();
            ShareFileClient      file = raiz.GetFileClient(filename);

            await file.DeleteAsync();
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public async Task DeleteFileAsync(String nombre)
 {
     ShareFileClient archivo = this.root.GetFileClient(nombre);
     await archivo.DeleteAsync();
 }
コード例 #4
0
 public async Task DeleteFileAsync(String filename)
 {
     ShareFileClient file = this.root.GetFileClient(filename);
     await file.DeleteAsync();
 }