zhouger 7 mesiacov pred
rodič
commit
c043abd60e

+ 37 - 0
src/main/java/sys/sc/formplugin/Filetest.java

@@ -0,0 +1,37 @@
+package sys.sc.formplugin;
+
+import kd.bos.script.annotations.KSMethod;
+import kd.bos.script.annotations.KSObject;
+
+import java.io.File;
+
+/**
+ * @author cjz
+ * @date 2024/9/9 14:12
+ * @description:
+ */
+@KSObject
+public class Filetest {
+
+
+    @KSMethod
+    public File getFile(String url){
+        return new File(url);
+    }
+
+    @KSMethod
+    public void createNewFile(File file) throws Exception{
+        file.createNewFile();
+    }
+
+    @KSMethod
+    public boolean exists(File file){
+
+        return file.exists();
+    }
+    @KSMethod
+    public boolean mkdirs(File file){
+
+        return file.mkdirs();
+    }
+}