Package org.apache.solr.util
Class FileUtils
- java.lang.Object
- 
- org.apache.solr.util.FileUtils
 
- 
 public class FileUtils extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description FileUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyFile(File src, File destination)static PathcreateDirectories(Path path)static booleanfileExists(String filePathString)static FileresolvePath(File base, String path)Resolves a path relative a base directory.static voidsync(File fullFile)Copied from Lucene's FSDirectory.fsync(String)
 
- 
- 
- 
Method Detail- 
resolvePathpublic static File resolvePath(File base, String path) Resolves a path relative a base directory.This method does what "new File(base,path)" Should do, if it wasn't completely lame: If path is absolute, then a File for that path is returned; if it's not absolute, then a File is returned using "path" as a child of "base") 
 - 
copyFilepublic static void copyFile(File src, File destination) throws IOException - Throws:
- IOException
 
 - 
syncpublic static void sync(File fullFile) throws IOException Copied from Lucene's FSDirectory.fsync(String)- Parameters:
- fullFile- the File to be synced to disk
- Throws:
- IOException- if the file could not be synced
 
 - 
fileExistspublic static boolean fileExists(String filePathString) 
 - 
createDirectoriespublic static Path createDirectories(Path path) throws IOException - Throws:
- IOException
 
 
- 
 
-