浏览代码

增加文件类型

zhou-hao 7 年之前
父节点
当前提交
c3ea9a4c3e

+ 7 - 0
hsweb-system/hsweb-system-dev-tools/src/main/java/org/hswebframework/web/dev/tools/reader/FileInfo.java

@@ -18,6 +18,11 @@ public class FileInfo {
 
     private String absolutePath;
 
+    private String type;
+
+    private boolean file;
+
+    private boolean dir;
 
     public static FileInfo from(File file){
         FileInfo info=new FileInfo();
@@ -25,6 +30,8 @@ public class FileInfo {
         info.setLength(file.length());
         info.setParent(file.getParent());
         info.setAbsolutePath(file.getAbsolutePath());
+        info.setFile(file.isFile());
+        info.setDir(file.isDirectory());
         return  info;
     }
 }