Exemplo n.º 1
0
 protected void removeFilePath() {
   FilePath filePath = this.getEntityFilePath();
   if (filePath != null) {
     File path =
         new File(
             Utils.getResourcesPath()
                 + Utils.getUploadsPath()
                 + filePath.getFilePath()
                 + File.separator);
     try {
       if (path.exists()) {
         Files.deleteContent(path);
         Files.deleteFolder(path);
       }
       this.filePathFacade.remove(filePath);
     } catch (FileNotFoundException ex) {
       ApplicationLogger.writeError(
           "Le dossier \"" + path.getPath() + "\" n'a pas pu être supprimé", ex);
     }
   }
 }