Package org.openbravo.utils

Examples of org.openbravo.utils.FileUtility.deleteFile()


      throw new ServletException(e.getMessage());
    } catch (IOException ioe) {
      try {
        FileUtility f = new FileUtility(globalParameters.strFTPDirectory, fileName, false, true);
        if (f.exists())
          f.deleteFile();
      } catch (IOException ioex) {
        log4j.error("Error trying to delete temporary report file " + fileName + " : "
            + ioex.getMessage());
      }
    } finally {
View Full Code Here


    }
    response.setHeader("Content-Disposition", "attachment; filename=" + filename + extension);
    f.dumpFile(response.getOutputStream());
    response.getOutputStream().flush();
    response.getOutputStream().close();
    if (!f.deleteFile())
      log4j.error("Download report could not delete the file :" + report);
  }
}
View Full Code Here

        if (file.exists())
          f = new FileUtility(globalParameters.strFTPDirectory + "/" + data[0].adTableId + "-"
              + data[0].adRecordId, data[0].name, false);
        else
          f = new FileUtility(globalParameters.strFTPDirectory, strFileReference, false);
        if (!f.deleteFile()) {
          myMessage.setType("Error");
          myMessage.setMessage(Utility.messageBD(this, "ProcessRunError", vars.getLanguage()));
          return myMessage;
        }
      } catch (final Exception ex) {
View Full Code Here

    } catch (IOException ioe) {
      try {
        FileUtility f = new FileUtility(globalParameters.strFTPDirectory, strFileName + "-"
            + (reportId) + "." + strOutputType, false, true);
        if (f.exists())
          f.deleteFile();
      } catch (IOException ioex) {
        log4j.error("Error trying to delete temporary report file " + strFileName + "-"
            + (reportId) + "." + strOutputType + " : " + ioex.getMessage());
      }
    } catch (final Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.