org.elasticsearch.common.io
Class FileSystemUtils
java.lang.Object
org.elasticsearch.common.io.FileSystemUtils
public class FileSystemUtils
- extends java.lang.Object
Method Summary |
static void |
copyFile(java.io.File sourceFile,
java.io.File destinationFile)
|
static boolean |
deleteRecursively(java.io.File root)
|
static boolean |
deleteRecursively(java.io.File root,
boolean deleteRoot)
Delete the supplied File - for directories,
recursively delete any nested directories or files as well. |
static boolean |
hasExtensions(java.io.File root,
java.lang.String... extensions)
|
static int |
maxOpenFiles(java.io.File testDir)
|
static void |
syncFile(java.io.File fileToSync)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxOpenFiles
public static int maxOpenFiles(java.io.File testDir)
hasExtensions
public static boolean hasExtensions(java.io.File root,
java.lang.String... extensions)
deleteRecursively
public static boolean deleteRecursively(java.io.File root)
deleteRecursively
public static boolean deleteRecursively(java.io.File root,
boolean deleteRoot)
- Delete the supplied
File
- for directories,
recursively delete any nested directories or files as well.
- Parameters:
root
- the root File
to deletedeleteRoot
- whether or not to delete the root itself or just the content of the root.
- Returns:
true
if the File
was deleted,
otherwise false
syncFile
public static void syncFile(java.io.File fileToSync)
throws java.io.IOException
- Throws:
java.io.IOException
copyFile
public static void copyFile(java.io.File sourceFile,
java.io.File destinationFile)
throws java.io.IOException
- Throws:
java.io.IOException