com.Ostermiller.util
Class FileHelper
java.lang.Object
com.Ostermiller.util.FileHelper
public class FileHelper
- extends Object
Utilities for File manipulation.
More information about this class is available from ostermiller.org.
- Since:
- ostermillerutils 1.00.00
- Author:
- Stephen Ostermiller http://ostermiller.org/contact.pl?regarding=Java+Utilities
Method Summary |
static void |
move(File from,
File to)
Move a file from one location to another. |
static void |
move(File from,
File to,
boolean overwrite)
Move a file from one location to another. |
FileHelper
public FileHelper()
move
public static void move(File from,
File to)
throws IOException
- Move a file from one location to another. An attempt is made to rename
the file and if that fails, the file is copied and the old file deleted.
If the destination file already exists, an exception will be thrown.
- Parameters:
from
- file which should be moved.to
- desired destination of the file.
- Throws:
IOException
- if an error occurs.- Since:
- ostermillerutils 1.00.00
move
public static void move(File from,
File to,
boolean overwrite)
throws IOException
- Move a file from one location to another. An attempt is made to rename
the file and if that fails, the file is copied and the old file deleted.
- Parameters:
from
- file which should be moved.to
- desired destination of the file.overwrite
- If false, an exception will be thrown rather than overwrite a file.
- Throws:
IOException
- if an error occurs.- Since:
- ostermillerutils 1.00.00
Copyright © 2001-2012 by Stephen Ostermiller