@Test public void testFileDelete() throws Exception { mockBlobExistence(true); assertTrue("Expected delete to return true", dataAccessor.deleteFile("containerName", "fileName")); mockBlobExistence(false); assertFalse("Expected delete to return false", dataAccessor.deleteFile("containerName", "fileName")); }
boolean deleteFile(String containerName, String fileName) throws BlobStorageException { BlockBlobClient blobClient = getBlockBlobClient(containerName, fileName, false); if (blobClient.exists()) { blobClient.delete(); return true; } return false; }
AzureBlobDataAccessor { boolean deleteFile(String containerName, String fileName) throws BlobStorageException { BlockBlobClient blobClient = getBlockBlobClient(containerName, fileName, false); if (blobClient.exists()) { blobClient.delete(); return true; } return false; } }
AzureBlobDataAccessor { boolean deleteFile(String containerName, String fileName) throws BlobStorageException { BlockBlobClient blobClient = getBlockBlobClient(containerName, fileName, false); if (blobClient.exists()) { blobClient.delete(); return true; } return false; } AzureBlobDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig,
      AzureBlobLayoutStrategy blobLayoutStrategy, AzureMetrics azureMetrics);   AzureBlobDataAccessor(BlobServiceClient storageClient, BlobBatchClient blobBatchClient, String clusterName,
      AzureMetrics azureMetrics); }
AzureBlobDataAccessor { boolean deleteFile(String containerName, String fileName) throws BlobStorageException { BlockBlobClient blobClient = getBlockBlobClient(containerName, fileName, false); if (blobClient.exists()) { blobClient.delete(); return true; } return false; } AzureBlobDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig,
      AzureBlobLayoutStrategy blobLayoutStrategy, AzureMetrics azureMetrics);   AzureBlobDataAccessor(BlobServiceClient storageClient, BlobBatchClient blobBatchClient, String clusterName,
      AzureMetrics azureMetrics); BlobServiceClient getStorageClient(); boolean uploadIfNotExists(BlobId blobId, long inputLength, CloudBlobMetadata cloudBlobMetadata,
      InputStream blobInputStream); void uploadFile(String containerName, String fileName, InputStream inputStream); boolean downloadFile(String containerName, String fileName, OutputStream outputStream, boolean errorOnNotFound); void downloadBlob(BlobId blobId, OutputStream outputStream); CloudBlobMetadata getBlobMetadata(BlobId blobId); AzureCloudDestination.UpdateResponse updateBlobMetadata(BlobId blobId, Map<String, Object> updateFields,
      CloudUpdateValidator cloudUpdateValidator); List<CloudBlobMetadata> purgeBlobs(List<CloudBlobMetadata> blobMetadataList); }
AzureBlobDataAccessor { boolean deleteFile(String containerName, String fileName) throws BlobStorageException { BlockBlobClient blobClient = getBlockBlobClient(containerName, fileName, false); if (blobClient.exists()) { blobClient.delete(); return true; } return false; } AzureBlobDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig,
      AzureBlobLayoutStrategy blobLayoutStrategy, AzureMetrics azureMetrics);   AzureBlobDataAccessor(BlobServiceClient storageClient, BlobBatchClient blobBatchClient, String clusterName,
      AzureMetrics azureMetrics); BlobServiceClient getStorageClient(); boolean uploadIfNotExists(BlobId blobId, long inputLength, CloudBlobMetadata cloudBlobMetadata,
      InputStream blobInputStream); void uploadFile(String containerName, String fileName, InputStream inputStream); boolean downloadFile(String containerName, String fileName, OutputStream outputStream, boolean errorOnNotFound); void downloadBlob(BlobId blobId, OutputStream outputStream); CloudBlobMetadata getBlobMetadata(BlobId blobId); AzureCloudDestination.UpdateResponse updateBlobMetadata(BlobId blobId, Map<String, Object> updateFields,
      CloudUpdateValidator cloudUpdateValidator); List<CloudBlobMetadata> purgeBlobs(List<CloudBlobMetadata> blobMetadataList);  }