aboutsummaryrefslogtreecommitdiff
path: root/other/java/client/src/main
diff options
context:
space:
mode:
authorJérôme Barotin <jeromebarotin@gmail.com>2021-05-07 09:24:24 +0200
committerJérôme Barotin <jeromebarotin@gmail.com>2021-05-07 09:33:03 +0200
commita46be0ca5607d47daf64f63b6558bf70e6084951 (patch)
tree2954a1c4eff4b6200373b054a5cd758d282114fa /other/java/client/src/main
parent9b5f54e36733854fc8d6897808ce53349cf7b785 (diff)
downloadseaweedfs-a46be0ca5607d47daf64f63b6558bf70e6084951.tar.xz
seaweedfs-a46be0ca5607d47daf64f63b6558bf70e6084951.zip
Add exists() to java client
Diffstat (limited to 'other/java/client/src/main')
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/FilerClient.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
index 91e7cba57..de03efbb4 100644
--- a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
+++ b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
@@ -126,6 +126,11 @@ public class FilerClient extends FilerGrpcClient {
}
+ public boolean exists(String path){
+ File pathFile = new File(path);
+ return lookupEntry(pathFile.getParent(), pathFile.getName()) != null;
+ }
+
public boolean rm(String path, boolean isRecursive, boolean ignoreRecusiveError) {
File pathFile = new File(path);