org.elasticsearch.common.io
Class FileSystemUtils

java.lang.Object
  extended by 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 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
 

Method Detail

maxOpenFiles

public static int maxOpenFiles(java.io.File testDir)

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 delete
deleteRoot - 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