public class FileUtil
extends java.lang.Object
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyDir(java.io.File srcDir,
java.io.File destDir) |
static void |
copyTo(java.io.InputStream in,
java.io.File dest) |
static void |
deleteDirectory(java.io.File file)
Recursively delete a directory.
|
static Maybe<java.lang.String> |
getFilePermissions(java.io.File file)
This utility will be deleted when we move to Java 7
|
static void |
moveDir(java.io.File srcDir,
java.io.File destDir) |
static void |
setFilePermissionsTo600(java.io.File file) |
static void |
setFilePermissionsTo700(java.io.File file) |
public static void setFilePermissionsTo700(java.io.File file) throws java.io.IOException
java.io.IOException
public static void setFilePermissionsTo600(java.io.File file) throws java.io.IOException
java.io.IOException
public static void moveDir(java.io.File srcDir, java.io.File destDir) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static void copyDir(java.io.File srcDir, java.io.File destDir) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static Maybe<java.lang.String> getFilePermissions(java.io.File file)
public static void copyTo(java.io.InputStream in, java.io.File dest)
public static void deleteDirectory(java.io.File file)
Any IOException that might be raised is logged and not thrown.
file
- The directory to be deleted