for (File f : files) {
file=fileMng.findByPath(f.getName());
if(valid!=null){
if(file!=null){
if(file.getFileIsvalid().equals(valid)){
list.add(new FileWrap(f, realPathResolver.get(""),null,valid));
}
}else{
if(valid.equals(false)){
list.add(new FileWrap(f, realPathResolver.get(""),null,false));
}
}
}else{
if(file!=null){
list.add(new FileWrap(f, realPathResolver.get(""),null,file.getFileIsvalid()));
}else{
list.add(new FileWrap(f, realPathResolver.get(""),null,false));
}
}
}
return list;
} else {