| | |
| | | /** |
| | | * 查询文件 |
| | | */ |
| | | public List<MetaEntity> selectFiles(String subPath, List<String> extList) throws IOException { |
| | | public List<MetaFileEntity> selectFiles(String subPath, List<String> extList) { |
| | | String root = pathHelper.getConfig().getTempPath() + File.separator + subPath; |
| | | |
| | | File file = new File(root); |
| | |
| | | return null; |
| | | } |
| | | |
| | | List<MetaEntity> list = new ArrayList<MetaEntity>(); |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | for (File f : files) { |
| | | String fileName = FileHelper.getFileName(f.getPath()); |
| | | if (null != extList) { |
| | |
| | | double sizes = FileHelper.sizeToMb(f.length()); |
| | | String filePath = subPath + File.separator + fileName; |
| | | |
| | | MetaEntity mf = new MetaEntity(); |
| | | MetaFileEntity mf = new MetaFileEntity(); |
| | | mf.setName(fileName); |
| | | mf.setSizes(sizes); |
| | | mf.setPath(filePath); |
| | |
| | | /** |
| | | * 删除文件 |
| | | */ |
| | | public Integer deleteFiles(List<MetaEntity> list) { |
| | | public Integer deleteFiles(List<MetaFileEntity> list) { |
| | | String root = pathHelper.getConfig().getTempPath(); |
| | | |
| | | int count = 0; |
| | | for (MetaEntity entity : list) { |
| | | for (MetaFileEntity entity : list) { |
| | | if (!StringHelper.isEmpty(entity.getPath())) { |
| | | String file = root + File.separator + entity.getPath(); |
| | | |