|
@@ -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();
|
|
|
|
+ }
|
|
|
|
+}
|