Package org.codehaus.mojo.mrm.api
Class BaseFileSystem
java.lang.Object
org.codehaus.mojo.mrm.api.BaseFileSystem
- All Implemented Interfaces:
FileSystem
Base implementation of
FileSystem that all implementations should extend from.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the entry at the specified path.protected Entryget(DirectoryEntry parent, String name) Gets the named entry in the specified directory.getRoot()Returns the root directory entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.mojo.mrm.api.FileSystem
getLastModified, listEntries, put
-
Constructor Details
-
BaseFileSystem
public BaseFileSystem()
-
-
Method Details
-
getRoot
Description copied from interface:FileSystemReturns the root directory entry.- Specified by:
getRootin interfaceFileSystem- Returns:
- the root directory entry.
-
get
Description copied from interface:FileSystemReturns the entry at the specified path. Anullresult proves the path does not exist, however very lazy caching implementations may return a non-null entry for paths which do not exist.- Specified by:
getin interfaceFileSystem- Parameters:
path- the path to retrieve theEntryof.- Returns:
- the
Entryornullif the path definitely does not exist.
-
get
Gets the named entry in the specified directory. The default implementation lists all the entries in the directory and looks for the one with the matching name. Caching implementations will likely want to override this behaviour.- Parameters:
parent- the directory.name- the name of the entry to get.- Returns:
- the
Entryornullif the entry does not exist.
-