Package com.Ostermiller.util
Class FileHelper
java.lang.Object
com.Ostermiller.util.FileHelper
Utilities for File manipulation.
More information about this class is available from ostermiller.org.
- Since:
- ostermillerutils 1.00.00
- Author:
- Stephen Ostermiller https://ostermiller.org/contact.pl?regarding=Java+Utilities
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FileHelper
public FileHelper()
-
-
Method Details
-
move
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
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
-