Package org.codehaus.mojo.mrm.api
Class DefaultDirectoryEntry
java.lang.Object
org.codehaus.mojo.mrm.api.AbstractEntry
org.codehaus.mojo.mrm.api.DefaultDirectoryEntry
- All Implemented Interfaces:
DirectoryEntry,Entry
Default implementation of
DirectoryEntry.- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDirectoryEntry(FileSystem fileSystem, DirectoryEntry parent, String name) Creates an entry in the specified file system with the specified parent and name. -
Method Summary
Modifier and TypeMethodDescriptionstatic DirectoryEntryequivalent(FileSystem target, DirectoryEntry directory) Creates aDefaultDirectoryEntrythat is equivalent to the suppliedDirectoryEntryonly in the specified targetFileSystem.longReturns the time that this entry was last modified.Methods inherited from class org.codehaus.mojo.mrm.api.AbstractEntry
equals, getFileSystem, getName, getParent, hashCode, toPath, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.mojo.mrm.api.Entry
getFileSystem, getName, getParent, toPath
-
Constructor Details
-
DefaultDirectoryEntry
Creates an entry in the specified file system with the specified parent and name.- Parameters:
fileSystem- The filesystem.parent- The parent (ornullif this is the root entry).name- The name of the entry (or the empty string if this is the root entry).- Since:
- 1.0
-
-
Method Details
-
equivalent
Creates aDefaultDirectoryEntrythat is equivalent to the suppliedDirectoryEntryonly in the specified targetFileSystem.- Parameters:
target- the filesystem.directory- the directory.- Returns:
- a
DirectoryEntryin the target filesystem. - Since:
- 1.0
-
getLastModified
Description copied from interface:EntryReturns the time that this entry was last modified. Note thatDirectoryEntrys may delegate toFileSystem.getLastModified(DirectoryEntry).- Specified by:
getLastModifiedin interfaceEntry- Returns:
- A
longvalue representing the time the directory was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0Lif the the time is unknown. - Throws:
IOException- if an I/O error occurs.
-