From a46be0ca5607d47daf64f63b6558bf70e6084951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Barotin?= Date: Fri, 7 May 2021 09:24:24 +0200 Subject: Add exists() to java client --- other/java/client/src/main/java/seaweedfs/client/FilerClient.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'other/java/client/src/main') 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); -- cgit v1.2.3