@Override
public Resource child(String name) {
File file = new File(realFile, name);
if(file.isDirectory()){
ResourcesManager resMan = (ResourcesManager) factory;
HashMap<Integer, ArrayList<String>> permissions = resMan.getUserPermissions(loggedUserID);
ArrayList<String> pathsAllowed = permissions.get(ownerID);
for (Iterator<String> iterator = pathsAllowed.iterator(); iterator.hasNext();) {
String path = (String) iterator.next();
if(path.equals(file.getAbsolutePath().replace(ServerConfiguration.getWebDAVrootPath(), ""))){
return new OverEncryptedFriendsFolder(factory, path, ownerID, loggedUserID);