Azure.Storage.FileStorageAsync.DeleteFileAsync C# (CSharp) Méthode

DeleteFileAsync() public méthode

public DeleteFileAsync ( string directoryName, string fileName ) : System.Threading.Tasks.Task
directoryName string
fileName string
Résultat System.Threading.Tasks.Task
        public async Task DeleteFileAsync(string directoryName, string fileName)
        {
            Validate.String(directoryName, "directoryName");
            Validate.String(fileName, "fileName");

            var rootDirectory = cloudFileShare.GetRootDirectoryReference();
            var directoryToUpdate = rootDirectory.GetDirectoryReference(directoryName);
            var file = directoryToUpdate.GetFileReference(fileName);

            await file.DeleteIfExistsAsync();
        }
    }