Azure / azure-storage-net

Microsoft Azure Storage Libraries for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Force delete non-empty directory

GuuBu opened this issue · comments

commented

The request here is same with that for azure-storage-java with issue Force delete non-empty directory. I just quoted the request description here:
"Is there a single call that can do this given that having do it the harder way (enumerate and delete individual elements of the tree) is going to be a costly network operation and hence is going to take much longer?"

I have a use case which has millions of files and subdirectories under the same root directory, and I just want to delete it forcibly and blindly. From Azure Storage Explorer, it is possible to do so( it also takes time), but with the rest API, it seems not feasible. It can take days to delete the files if use sequence action, and need to take into consideration of many aspects if do it in parallel using some parallel API.

I think it will be great if there is an option to force delete non-empty directory in API level, and provide the option to check delete progress and prevent the action timeout.

commented

I cannot just delete the share since the snapshot for it will be useful. For another use case, if we use a file share as redundant backup, and every time when we want to copy over a new backup, is that possible to only copy the diff part? Otherwise, I think there is a need to delete the files first. May I ask do you have plan to support it.