获取指定目录下的文件

来源:互联网 发布:智能网络摄像机哪个好 编辑:程序博客网 时间:2024/05/02 01:30
String projectPath = Constants.class.getResource("/").getFile();  
int findindex = projectPath.indexOf("WEB-INF");
projectPath = projectPath.substring(1, findindex + 8)+ "dict/glossary.dat";;
File file = new File(projectPath);
0 0
原创粉丝点击