public class FileUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.File sourceFile,
java.io.File targetFile)
Copies the specified sourceFile to the specified targetFile.
|
static FileReadOnlyHandler |
getFileReadOnlyHandler()
Returns the current FileReadOnlyHandler used by setFileReadOnly().
|
static void |
renameFile(java.io.File orig,
java.io.File dest)
Do the best to rename the file.
|
static void |
setFileReadOnly(java.io.File file,
boolean readOnly)
Sets the specified file read-only (readOnly == true) or writable (readOnly == false).
|
static void |
setFileReadOnlyHandler(FileReadOnlyHandler fileReadOnlyHandler)
Sets the specified fileReadOnlyHandler to be used with setFileReadOnly().
|
public static FileReadOnlyHandler getFileReadOnlyHandler()
public static void setFileReadOnlyHandler(FileReadOnlyHandler fileReadOnlyHandler)
public static void setFileReadOnly(java.io.File file, boolean readOnly) throws java.io.IOException
java.io.IOException
- if the operation failedpublic static void copyFile(java.io.File sourceFile, java.io.File targetFile) throws java.io.IOException
java.io.IOException
public static void renameFile(java.io.File orig, java.io.File dest) throws java.io.IOException
orig
- regular filedest
- regular file (if exists it's rewritten)java.io.IOException
Built on January 12 2013. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.