Package kilim.analysis
Class FileLister
java.lang.Object
kilim.analysis.FileLister
- All Implemented Interfaces:
Iterable<FileLister.Entry>
Utility class to present a uniform iterator interface for file containers; presently
includes directories and jar files.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) WeakReference<FileContainer> weak ref to a container to avoid hanging on to an open jar file.(package private) String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheck if dst is up to date with src, ie at least as newprivate FileContaineriterator()private FileContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
containerRef
weak ref to a container to avoid hanging on to an open jar file. -
name
String name
-
-
Constructor Details
-
FileLister
- Throws:
IOException
-
-
Method Details
-
open
- Parameters:
relativeFileName-- Returns:
- if the relativeFileName exists in the directory or jar represented by FileLister object open it. If not return null.
- Throws:
IOException
-
getContainer
- Throws:
IOException
-
openJar
- Throws:
IOException
-
iterator
- Specified by:
iteratorin interfaceIterable<FileLister.Entry>
-
check
check if dst is up to date with src, ie at least as new- Parameters:
src- the source filenamedst- the destination filename- Returns:
- true if dst exists and is at least as new as src
-