|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.file.Files
A collection of file utilities.
Field Summary | |
static int |
DEFAULT_BUFFER_SIZE
The default size of the copy buffer. |
Constructor Summary | |
Files()
|
Method Summary | |
static void |
copy(File source,
File target)
Copy a file. |
static void |
copy(File source,
File target,
byte[] buff)
Copy a file. |
static void |
copy(File source,
File target,
int size)
Copy a file. |
static boolean |
delete(File dir)
Delete a file, or a directory and all of its contents. |
static boolean |
delete(String dirname)
Delete a file or directory and all of its contents. |
static boolean |
deleteContaining(String filename)
Delete a directory contaning the given file and all its contents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
public Files()
Method Detail |
public static boolean delete(File dir)
dir
- The directory or file to delete.
public static boolean delete(String dirname)
dirname
- The name of the file or directory to delete.
public static boolean deleteContaining(String filename)
filename
- a file or directory in the containing directory to delete
public static void copy(File source, File target, byte[] buff) throws IOException
source
- Source file to copy.target
- Destination target file.buff
- The copy buffer.
IOException
- Failed to copy file.public static void copy(File source, File target, int size) throws IOException
source
- Source file to copy.target
- Destination target file.size
- The size of the copy buffer.
IOException
- Failed to copy file.public static void copy(File source, File target) throws IOException
source
- Source file to copy.target
- Destination target file.
IOException
- Failed to copy file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |