mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
HCFS recursively delete files
This commit is contained in:
parent
060ce1d9a2
commit
09383860e9
|
@ -116,6 +116,13 @@ public class SeaweedFileSystemStore {
|
||||||
return true;
|
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 =
|
FilerProto.DeleteEntryResponse response =
|
||||||
filerGrpcClient.getBlockingStub().deleteEntry(FilerProto.DeleteEntryRequest.newBuilder()
|
filerGrpcClient.getBlockingStub().deleteEntry(FilerProto.DeleteEntryRequest.newBuilder()
|
||||||
.setDirectory(getParentDirectory(path))
|
.setDirectory(getParentDirectory(path))
|
||||||
|
|
Loading…
Reference in a new issue