Commit 4b8eda1d by fangyuan

add 获取api 个数方法

parent 79ad107e
package com.live.utils;
import java.io.File;
/**
* 用来统计api 个数
*/
public class GetFilesNum {
public static int num = 0;
public static void main(String[] args) {
// TODO Auto-generated method stub
File file = new File("src/main/java/com/sow/cases");
show (file);
System.out.println("有"+num+"个Jar文件");
}
public static void show(File file) {
// TODO Auto-generated method stub
for(File f : file.listFiles()) {
if(f.isFile()) {
if(f.getName().startsWith("Test")) {
num++;
}
}else {
show(f);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment