private boolean deleteFile(String filepath){
  try {
    if (filepath != null) {
      File file=new File(filepath);
      if (file.exists()) {
        if (file.delete()) {
          logger.debug("Deleted: " + file.getPath());
          return true;
        }
 else {
          logger.warn("Delete failed: " + file.getPath());
        }
      }
 else {
        logger.warn("Delete failed, file does NOT exist: " + file.getPath());
        return true;
      }
    }
  }
 catch (  Exception e) {
    logger.error(e);
  }
  return false;
}

private boolean deleteFile ( String filepath ) { try { if ( filepath != null ) { File file = new File ( filepath ) ; if ( file . exists ( ) ) { if ( file . delete ( ) ) { logger . debug ( "Deleted: " + file . getPath ( ) ) ; return true ; } else { logger . warn ( "Delete failed: " + file . getPath ( ) ) ; } } else { logger . warn ( "Delete failed, file does NOT exist: " + file . getPath ( ) ) ; return true ; } } } catch ( Exception e ) { logger . error ( e ) ; } return false ; }
deletes the physical file identified by given absolute file path . returns true if delete succeeds or if file does not exist , false otherwise . downloadmanager actually deletes the physical file when remove method is called . so , this method might not be required for removing downloads .
