From 06df4d98619de4cc1fd8c452de401823b3c1168d Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Fri, 29 Jan 2021 16:40:57 +0800 Subject: [PATCH] =?UTF-8?q?DEC-17057=20fix:=20=E3=80=90=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E3=80=91=E3=80=90=E7=BB=84=E4=BB=B6=E5=87=BA=E9=94=99=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91HA=20HDFS=EF=BC=8C=E5=85=B3=E6=8E=89=E6=89=80?= =?UTF-8?q?=E6=9C=89datanode=EF=BC=8C=E5=90=AF=E5=8A=A8=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E9=83=A8=E7=BD=B2=E5=90=91=E5=AF=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/cluster/resource/FineFileServerKit.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/fanruan/api/cluster/resource/FineFileServerKit.java b/src/main/java/com/fanruan/api/cluster/resource/FineFileServerKit.java index eadcef1..e29247d 100644 --- a/src/main/java/com/fanruan/api/cluster/resource/FineFileServerKit.java +++ b/src/main/java/com/fanruan/api/cluster/resource/FineFileServerKit.java @@ -2,6 +2,7 @@ package com.fanruan.api.cluster.resource; import com.fr.decision.fileserver.FineFileServer; import com.fr.io.config.RepositoryConfig; +import com.fr.io.repository.ResourceRepository; /** * 文件服务器Kit. @@ -22,4 +23,15 @@ public class FineFileServerKit { return FineFileServer.getInstance().getRepoConfig(); } + /** + * 文件服务器读写权限测试. + * + * @param repo 仓库 + * @param workRoot 工作路径 + * @return 是否有读写权限 + */ + public static boolean hasReadWritePermission(ResourceRepository repo, String workRoot) { + return FineFileServer.getInstance().hasReadWritePermission(repo, workRoot); + } + }