Package org.codehaus.mojo.mrm.api
Interface Entry
- All Known Subinterfaces:
DirectoryEntry,FileEntry
- All Known Implementing Classes:
AbstractEntry,BaseFileEntry,DefaultDirectoryEntry
public interface Entry
An entry in the repository.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the repository that this entry belongs to.longReturns the time that this entry was last modified.getName()Returns the name of this entry.Returns the parent of this entry (ornullif there is no parent, that is the root entry).toPath()Returns the path of this entry relative to the root of the filesystem.
-
Method Details
-
getFileSystem
FileSystem getFileSystem()Returns the repository that this entry belongs to.- Returns:
- the repository that this entry belongs to.
- Since:
- 1.0
-
getParent
DirectoryEntry getParent()Returns the parent of this entry (ornullif there is no parent, that is the root entry).- Returns:
- the parent of this entry (or
nullif there is no parent, that is the root entry). - Since:
- 1.0
-
getName
String getName()Returns the name of this entry.- Returns:
- the name of this entry.
- Since:
- 1.0
-
getLastModified
Returns the time that this entry was last modified. Note thatDirectoryEntrys may delegate toFileSystem.getLastModified(DirectoryEntry).- 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.- Since:
- 1.0
-
toPath
String toPath()Returns the path of this entry relative to the root of the filesystem. Must not start with a '/'.- Returns:
- the path of this entry relative to the root of the filesystem.
- Since:
- 1.0
-