for(ZeusUser zu:users){
//没有公共文档则不返回该用户
if(!hasCommonFiles(zu)){
continue;
}
FileModel model=new FileModel();
model.setAdmin(false);
model.setFolder(true);
model.setId(zu.getUid());
model.setName(zu.getName()+"("+zu.getUid()+")");
model.setOwner(zu.getUid());
result.add(model);
}
}else if(fm.getId().contains("\\")){
List<FileDescriptor> files=fileManager.getUserFiles(fm.getId());
for(FileDescriptor fd:files){
if(fd.getName().equalsIgnoreCase(FileManager.SHARE)){
FileModel model=new FileModel();
model.setAdmin(false);
model.setFolder(fd.isFolder());
model.setId(fd.getId());
model.setName(fd.getName());
model.setOwner(fd.getOwner());
model.setParentId(fm.getId());
result.add(model);
}
}
}else{
List<FileDescriptor> files=fileManager.getSubFiles(fm.getId());
for(FileDescriptor fd:files){
FileModel model=convert(fd);
result.add(model);
}
}
return result;
}