如何通过java删除在azure存储帐户blob中创建的目录中的blob?

时间:2017-06-20 09:41:07

标签: java azure logic blob

我想将本地文件夹上传到azure存储帐户的blob。 代码是:

   CloudBlockBlob blob = container.getBlockBlobReference("Directory1/Directory2/Directory3/Directory4Directory5/temp.txt");
        File source = new File(filePath);
        blob.upload(new FileInputStream(source), source.length());
        CloudBlobDirectory directoryOfTempFile = container.getDirectoryReference("Directory1/Directory2/Directory3/Directory4Directory5");
        CloudBlockBlob blobToDelete = directoryOfTempFile.getBlockBlobReference("temp.txt");
        blobToDelete.deleteIfExists(); 

如何删除文件Temp.txt?

0 个答案:

没有答案