|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cloudera.sqoop.util.FileListing
public final class FileListing
Recursive file listing under a specified directory. Taken from http://www.javapractices.com/topic/TopicAction.do?Id=68 Used under the terms of the CC Attribution license: http://creativecommons.org/licenses/by/3.0/ Method by Alex Wong (javapractices.com)
Method Summary | |
---|---|
static java.util.List<java.io.File> |
getFileListing(java.io.File aStartingDir)
Recursively walk a directory tree and return a List of all Files found; the List is sorted using File.compareTo(). |
static void |
main(java.lang.String... aArgs)
Demonstrate use. |
static void |
recursiveDeleteDir(java.io.File dir)
Recursively delete a directory and all its children. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String... aArgs) throws java.io.FileNotFoundException
aArgs
- - aArgs[0] is the full name of an existing
directory that can be read.
java.io.FileNotFoundException
public static java.util.List<java.io.File> getFileListing(java.io.File aStartingDir) throws java.io.FileNotFoundException
aStartingDir
- is a valid directory, which can be read.
java.io.FileNotFoundException
public static void recursiveDeleteDir(java.io.File dir) throws java.io.IOException
dir
- is a valid directory.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |