| | |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | for (File f : files) { |
| | | String fileName = FileHelper.getFileName(f.getPath()); |
| | | if (null != extList) { |
| | | String extName = FileHelper.getExtension(fileName); |
| | | if (!extList.contains(extName)) { |
| | | continue; |
| | | } |
| | | String extName = FileHelper.getExtension(fileName); |
| | | if (null != extList && !extList.contains(extName)) { |
| | | continue; |
| | | } |
| | | |
| | | double sizes = FileHelper.sizeToMb(f.length()); |
| | | String filePath = subPath + File.separator + fileName; |
| | | |
| | | MetaFileEntity mf = new MetaFileEntity(); |
| | | mf.setName(fileName); |
| | | mf.setSizes(sizes); |
| | | mf.setPath(filePath); |
| | | mf.setGuid(FileHelper.getFileMd5(f.getPath())); |
| | | mf.setExtName(extName); |
| | | mf.setSizes(FileHelper.sizeToMb(f.length())); |
| | | mf.setPath(subPath + File.separator + fileName); |
| | | // mf.setGuid(FileHelper.getFileMd5(f.getPath())) |
| | | |
| | | list.add(mf); |
| | | } |