src/main/java/org/jboss/util/file/Files.java
/**
    * Delete a directory contaning the given file and all its contents.
    *
    * @param filename a file or directory in the containing directory to delete
    * @return true if all delete operations were successfull, false if any
    * delete failed.
    */
Delete a directory contaning the given file and all its contents.
@param filename a file or directory in the containing directory to delete
@return true if all delete operations were successfull, false if any
delete failed.
Delete a directory contaning the given file and all its contents . @param filename a file or directory in the containing directory to delete @return true if all delete operations were successfull false if any delete failed .
public static boolean deleteContaining(final String filename)
   {
      File file = new File(filename);
      File containingDir = file.getParentFile();
      return delete(containingDir);
   }
public static boolean deleteContaining ( final String filename ) { File file = new File ( filename ) ; File containingDir = file . getParentFile ( ) ; return delete ( containingDir ) ; }
Delete a directory contaning the given file and all its contents.
Delete a directory contaning the given file and all its contents .