|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.util.FSUtils
public class FSUtils
Utility methods for common filesystem operations.
Constructor Summary | |
---|---|
FSUtils()
|
Method Summary | |
---|---|
static void |
closeReaders(MapFile.Reader[] readers)
Closes a group of MapFile readers. |
static void |
closeReaders(SequenceFile.Reader[] readers)
Closes a group of SequenceFile readers. |
static void |
replace(FileSystem fs,
Path current,
Path replacement,
boolean removeOld)
Replaces the current path with the new path and if set removes the old path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSUtils()
Method Detail |
---|
public static void replace(FileSystem fs, Path current, Path replacement, boolean removeOld) throws IOException
fs
- The FileSystem.current
- The end path, the one being replaced.replacement
- The path to replace with.removeOld
- True if we are removing the current path.
IOException
- If an error occurs during replacement.public static void closeReaders(SequenceFile.Reader[] readers) throws IOException
readers
- The SequenceFile readers to close.
IOException
- If an error occurs while closing a reader.public static void closeReaders(MapFile.Reader[] readers) throws IOException
readers
- The MapFile readers to close.
IOException
- If an error occurs while closing a reader.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |