- public static List<File> getFileFromSd(String filePath, String fileDot){
- List<File> fileList=new ArrayList<File>();
- File path=new File(filePath);
- File[] files=path.listFiles();
- for (File file:files) {
- if(file.isFile()){
- String fileName=file.getName();
- if(fileName.endsWith(fileDot)){
- fileList.add(file);
- }
- }
- }
- return fileList;
- }
获取文件夹内所有指定后缀的文件
最新推荐文章于 2024-01-21 00:53:36 发布