Class 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
    • Constructor Detail

      • 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 Detail

      • main

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

        public static String getTempMailName​(String subject,
                                             String extension)
      • 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