String halfPath = realPathSharedFile.replace(ServerConfiguration.getWebDAVrootPath(), "");
if(realPathSharedFile.endsWith("/" + friendID)){
//rootFolder
//friends folder es: "/67"
return new OverEncryptedFriendsFolder(this, "/" + friendID, friendID, userLoggedID);
}else if(mapOfPermissions.get(friendID).contains(halfPath)){
//If user has permissions into afterShared folder
if(sharedFile.isDirectory()){
return new OverEncryptedFriendsFolder(this, halfPath, friendID, userLoggedID);
}else{
//TODO non dovrebbe mai essere un file qui
return new OverEncryptedFriendsFile(this, halfPath, false);
}
}else if(!sharedFile.isDirectory()){