org.codehaus.mojo.mrm.api
Class DefaultDirectoryEntry

java.lang.Object
  extended by org.codehaus.mojo.mrm.api.AbstractEntry
      extended by 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

Constructor Summary
DefaultDirectoryEntry(FileSystem fileSystem, DirectoryEntry parent, String name)
          Creates an entry in the specified file system with the specified parent and name.
 
Method Summary
static DirectoryEntry equivalent(FileSystem target, DirectoryEntry directory)
          Creates a DefaultDirectoryEntry that is equivalent to the supplied DirectoryEntry only in the specified target FileSystem.
 long getLastModified()
          Returns the time that this entry was last modified.
 
Methods inherited from class org.codehaus.mojo.mrm.api.AbstractEntry
equals, getFileSystem, getName, getParent, hashCode, toPath, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.mojo.mrm.api.Entry
getFileSystem, getName, getParent, toPath
 

Constructor Detail

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
Method Detail

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.