1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-04 08:06:53 +02:00

HCFS recursively delete files

This commit is contained in:
Chris Lu 2018-12-04 22:57:23 -08:00
parent 060ce1d9a2
commit 09383860e9

View file

@ -116,6 +116,13 @@ public class SeaweedFileSystemStore {
return true;
}
if (recursive && isDirectroy) {
List<FilerProto.Entry> entries = lookupEntries(path);
for (FilerProto.Entry entry : entries) {
deleteEntries(new Path(path, entry.getName()), entry.getIsDirectory(), recursive);
}
}
FilerProto.DeleteEntryResponse response =
filerGrpcClient.getBlockingStub().deleteEntry(FilerProto.DeleteEntryRequest.newBuilder()
.setDirectory(getParentDirectory(path))