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:
- Serializable, DirectoryEntry, Entry
public class DefaultDirectoryEntry
- extends AbstractEntry
- implements DirectoryEntry
Default implementation of DirectoryEntry.
- Since:
- 1.0
- See Also:
- Serialized Form
DefaultDirectoryEntry
public DefaultDirectoryEntry(FileSystem fileSystem,
DirectoryEntry parent,
String name)
- Creates an entry in the specified file system with the specified parent and name.
- Parameters:
fileSystem - The filesystem.parent - The parent (or null if this is the root entry).name - The name of the entry (or the empty string if this is the root entry).- Since:
- 1.0
equivalent
public static DirectoryEntry equivalent(FileSystem target,
DirectoryEntry directory)
- Creates a
DefaultDirectoryEntry that is equivalent to the supplied DirectoryEntry only in
the specified target FileSystem.
- Parameters:
target - the filesystem.directory - the directory.
- Returns:
- a
DirectoryEntry in the target filesystem. - Since:
- 1.0
getLastModified
public long getLastModified()
throws IOException
- Returns the time that this entry was last modified. Note that
DirectoryEntrys may
delegate to FileSystem.getLastModified(DirectoryEntry).
- Specified by:
getLastModified in interface Entry
- Returns:
- A
long value representing the time the directory was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L if the
the time is unknown.
- Throws:
IOException - if an I/O error occurs.
Copyright © 2009-2011 Codehaus. All Rights Reserved.