瀏覽代碼

代码升级

liukx 3 年之前
父節點
當前提交
ea83da442d
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      elab-test/src/test/java/com/elab/my/github/FileCase.java

+ 4 - 2
elab-test/src/test/java/com/elab/my/github/FileCase.java

@@ -9,9 +9,11 @@ import java.util.Set;
 public class FileCase {
     Set<String> fileList = new HashSet<>();
 
+    private String fileDir = "D:\\github\\MyHome\\";
+
     @Test
     public void testFile() {
-        String filePath = "D:\\github\\MyHome\\文章";
+        String filePath = fileDir + "文章";
         File[] files = new File(filePath).listFiles();
         deepFile(files, 0);
     }
@@ -27,7 +29,7 @@ public class FileCase {
             } else {
                 if (!isEndWith(file.getName(), "png", "gif", "jpg")) {
                     System.out.println(
-                        appendIndex("-", index) + "\t" + "[" + file.getName() + "](" + mdPath(file.getPath(),
+                        appendIndex("-", 1) + "\t" + "[" + file.getName() + "](" + mdPath(file.getPath(),
                             "D:\\github\\MyHome", ".") + ")");
                 }
             }