org.neo4j.kernel.impl.util
Class FileUtils
java.lang.Object
org.neo4j.kernel.impl.util.FileUtils
public class FileUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtils
public FileUtils()
deleteRecursively
public static void deleteRecursively(File directory)
throws IOException
- Throws:
IOException
deleteFile
public static boolean deleteFile(File file)
deleteFiles
public static File[] deleteFiles(File directory,
String regexPattern)
throws IOException
- Throws:
IOException
moveFile
public static File moveFile(File toMove,
File targetDirectory)
- Utility method that moves a file from its current location to the
provided target directory. This is not a rename,
use
renameFile(File, File)
instead. The reason this exists is
for convenience and error checking.
- Parameters:
toMove
- The File object to move. Cannot be a directory.targetDirectory
-
- Returns:
- the new file, null iff the move was unsuccessful
renameFile
public static boolean renameFile(File srcFile,
File renameToFile)
truncateFile
public static void truncateFile(FileChannel fileChannel,
long position)
throws IOException
- Throws:
IOException
truncateFile
public static void truncateFile(File file,
long position)
throws IOException
- Throws:
IOException
fixSeparatorsInPath
public static String fixSeparatorsInPath(String path)
copyFile
public static void copyFile(File srcFile,
File dstFile)
throws IOException
- Throws:
IOException
copyRecursively
public static void copyRecursively(File fromDirectory,
File toDirectory)
throws IOException
- Throws:
IOException
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.