io
Class FileUtil

java.lang.Object
  extended by io.FileUtil

public class FileUtil
extends Object

Some file uitilities missing.


Constructor Summary
FileUtil()
           
 
Method Summary
static boolean copyFile(File src, File dst, boolean over)
          Copies the first file to the second one.
static boolean createOrPurge(File dir, String ext)
          This method creates a directory from the stated abstract path name, or, if this directory is already present, it purges all files ending with the specified extension.
static boolean purge(File dir, String ext)
          In an existing directory, list all files ending with the specified extension and delete them.
static boolean writeList(List<String> list, File dst, boolean over)
          Writes the list of strings as an ascii file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

copyFile

public static boolean copyFile(File src,
                               File dst,
                               boolean over)
                        throws IOException
Copies the first file to the second one.

Throws:
IOException

writeList

public static boolean writeList(List<String> list,
                                File dst,
                                boolean over)
                         throws IOException
Writes the list of strings as an ascii file.

Throws:
IOException

createOrPurge

public static boolean createOrPurge(File dir,
                                    String ext)
This method creates a directory from the stated abstract path name, or, if this directory is already present, it purges all files ending with the specified extension.


purge

public static boolean purge(File dir,
                            String ext)
In an existing directory, list all files ending with the specified extension and delete them. Return true on success.