|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.plexus.util.FileUtils
fr.paris.lutece.maven.FileUtils
public class FileUtils
Utility class to manipulate files.
Note : these methods were copied from plexus-utils 1.2 because :
copyDirectoryStructureIfModified;
| Field Summary | |
|---|---|
protected static java.lang.String |
REGEXP_SITE_RESOURCES_XML
|
protected static java.lang.String |
REGEXP_SITE_TECH
|
protected static java.lang.String |
REGEXP_SITE_TECH_DIRECTORY
|
protected static java.lang.String |
REGEXP_SITE_XDOC_XML
|
protected static java.lang.String |
REGEXP_SITE_XML
|
| Fields inherited from class org.codehaus.plexus.util.FileUtils |
|---|
FS, ONE_GB, ONE_KB, ONE_MB |
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static void |
copyDirectoryStructure(java.io.File sourceDirectory,
java.io.File destinationDirectory)
Copies an entire directory structure. |
static void |
copyDirectoryStructureIfModified(java.io.File sourceDirectory,
java.io.File destinationDirectory)
Copies an entire directory structure but only source files with timestamp later than the destinations'. |
static void |
copyFile(java.io.File source,
java.io.File destination)
Copy file from source to destination. |
static int |
copyFileIfModified(java.io.File source,
java.io.File destination)
Copy file from source to destination only if source timestamp is later than the destination timestamp. |
static int |
copyFileToDirectoryIfModified(java.io.File source,
java.io.File destinationDirectory)
Copy file from source to destination only if source is newer than the target file. |
static int |
getNbFileCopy()
|
static int |
getNbFileModified()
|
static void |
setNbFileCopy(int nbFileCopy)
|
static void |
setNbFileModified(int nbFileMdofied)
|
| Methods inherited from class org.codehaus.plexus.util.FileUtils |
|---|
basename, basename, byteCountToDisplaySize, catPath, cleanDirectory, cleanDirectory, contentEquals, copyDirectory, copyDirectory, copyFileToDirectory, copyFileToDirectory, copyURLToFile, createTempFile, deleteDirectory, deleteDirectory, dirname, extension, fileAppend, fileDelete, fileExists, filename, fileRead, fileRead, fileWrite, forceDelete, forceDelete, forceDeleteOnExit, forceMkdir, getDefaultExcludes, getDefaultExcludesAsList, getExtension, getFile, getFileNames, getFileNames, getFiles, getFiles, getFilesFromExtension, getPath, getPath, mkdir, normalize, removeExtension, removePath, removePath, rename, resolveFile, sizeOfDirectory, sizeOfDirectory, toFile, toURLs, waitFor, waitFor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String REGEXP_SITE_XDOC_XML
protected static final java.lang.String REGEXP_SITE_RESOURCES_XML
protected static final java.lang.String REGEXP_SITE_TECH
protected static final java.lang.String REGEXP_SITE_TECH_DIRECTORY
protected static final java.lang.String REGEXP_SITE_XML
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static int getNbFileModified()
public static void setNbFileModified(int nbFileMdofied)
public static int getNbFileCopy()
public static void setNbFileCopy(int nbFileCopy)
public static void copyDirectoryStructureIfModified(java.io.File sourceDirectory,
java.io.File destinationDirectory)
throws java.io.IOException
sourceDirectory must exists.
sourceDirectory - the source directory.destinationDirectory - the destination directory.
java.io.IOException - if an I/O exception occurs.
public static void copyDirectoryStructure(java.io.File sourceDirectory,
java.io.File destinationDirectory)
throws java.io.IOException
sourceDirectory must exists.
sourceDirectory - the source directory.destinationDirectory - the destination directory.
java.io.IOException - if an I/O exception occurs.
public static int copyFileToDirectoryIfModified(java.io.File source,
java.io.File destinationDirectory)
throws java.io.IOException
destinationDirectory does not exist, it
(and any parent directories) will be created. If a file
source in destinationDirectory exists, it
will be overwritten.
source - An existing File to copy.destinationDirectory - A directory to copy source into.
java.io.FileNotFoundException - if source isn't a normal file.
java.lang.IllegalArgumentException - if destinationDirectory isn't a directory.
java.io.IOException - if source does not exist, the file in
destinationDirectory cannot be written to, or
an IO error occurs during copying.
public static int copyFileIfModified(java.io.File source,
java.io.File destination)
throws java.io.IOException
destination will be created if they don't already exist.
destination will be overwritten if it already exists.
source - An existing non-directory File to copy bytes
from.destination - A non-directory File to write bytes to
(possibly overwriting).
java.io.IOException - if source does not exist,
destination cannot be written to, or an IO
error occurs during copying.
java.io.FileNotFoundException - if destination is a directory (use
FileUtils.copyFileToDirectory(java.lang.String, java.lang.String)).
public static void copyFile(java.io.File source,
java.io.File destination)
throws java.io.IOException
destination will be created if they don't already exist.
destination will be overwritten if it already exists.
source - An existing non-directory File to copy bytes
from.destination - A non-directory File to write bytes to
(possibly overwriting).
java.io.IOException - if source does not exist,
destination cannot be written to, or an IO
error occurs during copying.
java.io.FileNotFoundException - if destination is a directory (use
FileUtils.copyFileToDirectory(java.lang.String, java.lang.String)).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||