Class FileUtil

java.lang.Object
org.compiere.tools.FileUtil

public class FileUtil extends Object
File Utilities
Version:
$Id: FileUtil.java,v 1.4 2006/08/03 04:03:22 jjanke Exp $
Author:
Jorg Janke
  • Field Details

  • Constructor Details

    • FileUtil

      public FileUtil(String file, String filter, String action, String p1, String p2)
      File Utility
      Parameters:
      file - input file or directory
      filter - filter
      action - action
      p1 - parameter 1
      p2 - parameter 2
    • FileUtil

      public FileUtil(File file, String filter, String action, String p1, String p2)
      File Utility
      Parameters:
      file - input file or directory
      filter - filter
      action - action
      p1 - parameter 1
      p2 - parameter 2
  • Method Details

    • main

      public static void main(String[] args)
      Start
      Parameters:
      args - fileName filter action
    • getTempMailName

      public static String getTempMailName(String subject, String extension)
    • parseTitle

      public static String parseTitle(Properties ctx, String title, int table_ID, int record_ID, int m_WindowNo, String trxName)
      Parameters:
      title -
      table_ID -
      record_ID -
      ctx -
      m_WindowNo -
      trxName -
      Returns:
    • createTempFile

      public static File createTempFile(String prefix, String suffix, File directory) throws IOException
      Throws:
      IOException
    • createTempFile

      public static File createTempFile(String prefix, String suffix) throws IOException
      Throws:
      IOException
    • deleteFolderRecursive

      public static boolean deleteFolderRecursive(File path) throws FileNotFoundException
      Parameters:
      path -
      Returns:
      true if deleted
      Throws:
      FileNotFoundException
    • copy

      public static void copy(MAttachment attachment, File destinationFile, int index)
      copy attachment entry to file
      Parameters:
      attachment -
      destinationFile -
      index -
    • deleteDirectory

      public static void deleteDirectory(File folder) throws IOException
      delete folder recursively
      Parameters:
      folder -
      Throws:
      IOException