public void deleteFile(String name, String directoryPath) throws FileException {
validateDirectory(directoryPath);
File file = new File(directoryPath+name);
if(!file.exists() || !file.delete())
throw new FileException("Impossible to delete file " + directoryPath + name);
}