|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.entry.Enumerator | +--sam.entry.FileSystem
Enumerates local files and recurse sub-directories
Field Summary |
Fields inherited from class sam.entry.Enumerator |
EMPTY |
Constructor Summary | |
FileSystem(java.io.File baseDirectory)
Builds a new file system enumerator which enumerates files in specified directory |
|
FileSystem(java.io.File baseDirectory,
boolean listDirectories)
Builds a new file system enumerator which enumerates files in specified directory |
|
FileSystem(java.io.File baseDirectory,
boolean listDirectories,
boolean keepDirectoryName)
Builds a new file system enumerator. |
|
FileSystem(java.lang.String baseDirectory)
Builds a new file system enumerator which enumerates files in specified directory |
Method Summary | |
boolean |
hasMoreElements()
Wether this Enumerator has more elements |
sam.entry.Entry |
nextEntry()
Gets next entry, or null if none |
static sam.entry.Enumerator |
scan(java.io.File directory,
java.lang.String[] specifications)
Scans for file names specifications (wildcards allowed). |
static sam.entry.Enumerator |
scan(java.lang.String[] specifications)
Enumerates specified files. |
java.lang.String |
toString()
|
Methods inherited from class sam.entry.Enumerator |
filter, filter, isEmpty, load, nextElement, println, println, statify, store |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FileSystem(java.lang.String baseDirectory)
Note that directories are not listed themselves
public FileSystem(java.io.File baseDirectory)
Note that directories are not listed themselves
public FileSystem(java.io.File baseDirectory, boolean listDirectories)
listDirectories
- wether directories are to be listed themselvespublic FileSystem(java.io.File baseDirectory, boolean listDirectories, boolean keepDirectoryName)
baseDirectory
- the single file or directory to scan recursively.listDirectories
- wether or not to include directories themselves in the enumeration.keepDirectoryName
- wether or not to keep the base directory name in enumerated namesMethod Detail |
public static sam.entry.Enumerator scan(java.io.File directory, java.lang.String[] specifications)
specifications
recursively from directory
.
Moreover the file-system scanning is lazy until a call to nextEntry()
or to statify()
public static sam.entry.Enumerator scan(java.lang.String[] specifications)
specifications
must be either a proper file name or a proper readable directory.
In particular wildcards are not allowed here.
Moreover the file-system scanning is lazy until a call to nextEntry()
or to statify()
public sam.entry.Entry nextEntry()
Enumerator
null
if none
nextEntry
in class Enumerator
public boolean hasMoreElements()
Enumerator
Enumerator
has more elements
hasMoreElements
in interface java.util.Enumeration
hasMoreElements
in class Enumerator
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |