net.livesite.util
Class Save

java.lang.Object
  extended by net.livesite.util.Save

public class Save
extends Object


Constructor Summary
Save()
           
 
Method Summary
static boolean copy(File source, File dest)
          Copy the contents of one file to another unless the destination exists.
static boolean copyFile(File source, File dest, boolean overwrite)
          Copy the contents of one file to another.
static boolean overwrite(File source, File dest)
          Copy the contents of one file to another, overwritting if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Save

public Save()
Method Detail

copy

public static boolean copy(File source,
                           File dest)
                    throws IOException
Copy the contents of one file to another unless the destination exists.

Parameters:
source - valid file
dest - valid file
Returns:
true if a copy was performed
Throws:
IOException

overwrite

public static boolean overwrite(File source,
                                File dest)
                         throws IOException
Copy the contents of one file to another, overwritting if necessary.

Parameters:
source - valid file
dest - valid file
Returns:
true if a copy was performed
Throws:
IOException

copyFile

public static boolean copyFile(File source,
                               File dest,
                               boolean overwrite)
                        throws IOException
Copy the contents of one file to another.

Parameters:
source - valid file
dest - valid file
overwrite - delete and re-create dest if it exists
Returns:
true if a copy was performed
Throws:
IOException