This class provides basic facilities for manipulating files and file paths.
Path-related methods
Methods exist to retrieve the components of a typical file path. For example /www/hosted/mysite/index.html
, can be broken into:
/www/hosted/mysite/
-- retrievable through {@link #getPath} index.html
-- retrievable through {@link #removePath} /www/hosted/mysite/index
-- retrievable through {@link #removeExtension} html
-- retrievable through {@link #getExtension}
There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve apath relative to a File} and {@link #normalize} a path.
File-related methods
There are methods to create a {@link #toFile File from a URL}, copy a {@link #copyFileToDirectory File to a directory}, copy a {@link #copyFile File to another File}, copy a {@link #copyURLToFile URL's contents to a File}, as well as methods to {@link #deleteDirectory(File) delete} and {@link #cleanDirectory(File) clean} a directory.
Common {@link java.io.File} manipulation routines.
Taken from the commons-utils repo. Also code from Alexandria's FileUtils. And from Avalon Excalibur's IO. And from Ant.
@author
Kevin A. Burton
@author
Scott Sanders
@author
Daniel Rall
@author
Christoph.Reck
@author
Peter Donald
@author
Jeff Turner
@version $Id$