//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()){
//TODO Miss a check for allows only files into allowed paths and tokens in parent path
return new OverEncryptedFriendsFile(this, halfPath, true);
}
}else{
LOGGER.debug("mapsOfFriendAndFiles doesn't contain friend id.");
permitted = false;
}