org.elasticsearch.common.io
Class FileSystemUtils
java.lang.Object
org.elasticsearch.common.io.FileSystemUtils
public class FileSystemUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mkdirs
public static boolean mkdirs(File dir)
checkMkdirsStall
public static void checkMkdirsStall(long currentTime)
maxOpenFiles
public static int maxOpenFiles(File testDir)
hasExtensions
public static boolean hasExtensions(File root,
String... extensions)
deleteRecursively
public static boolean deleteRecursively(File[] roots)
deleteRecursively
public static boolean deleteRecursively(File root)
deleteRecursively
public static boolean deleteRecursively(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(File fileToSync)
throws IOException
- Throws:
IOException
copyFile
public static void copyFile(File sourceFile,
File destinationFile)
throws IOException
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.