Class AbstractPlexusIoResource
java.lang.Object
org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource
- All Implemented Interfaces:
FileInfo, ContentSupplier, NameSupplier, SizeSupplier, PlexusIoResource
- Direct Known Subclasses:
PlexusIoFileResource, PlexusIoURLResource
Default implementation of
PlexusIoResource.-
Field Summary
Fields inherited from interface PlexusIoResource
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPlexusIoResource(String name, long lastModified, long size, boolean isFile, boolean isDirectory, boolean isExisting) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the date, when the resource was last modified, if known.getName()Returns the resources name, which may include path components, like directory names, or something like that.longgetSize()Returns the resources size, if known.booleanReturns, whether theFileInforefers to a directory.booleanReturns, whether the resource exists.booleanisFile()Returns, whether theFileInforefers to a file.booleanReturns, whether theFileInforefers to a symlink.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PlexusIoResource
getContents, getURL
-
Constructor Details
-
AbstractPlexusIoResource
-
-
Method Details
-
getLastModified
public long getLastModified()Description copied from interface:PlexusIoResourceReturns the date, when the resource was last modified, if known. Otherwise, returnsPlexusIoResource.UNKNOWN_MODIFICATION_DATE.- Specified by:
getLastModifiedin interfacePlexusIoResource- See Also:
-
getName
Description copied from interface:FileInfoReturns the resources name, which may include path components, like directory names, or something like that. The resources name is expected to be a relative name and the path components must be separated byFile.pathSeparator- Specified by:
getNamein interfaceFileInfo- Specified by:
getNamein interfaceNameSupplier
-
getSize
public long getSize()Description copied from interface:PlexusIoResourceReturns the resources size, if known. Otherwise returnsPlexusIoResource.UNKNOWN_RESOURCE_SIZE.- Specified by:
getSizein interfacePlexusIoResource- Specified by:
getSizein interfaceSizeSupplier
-
isDirectory
public boolean isDirectory()Description copied from interface:PlexusIoResourceReturns, whether theFileInforefers to a directory.- Specified by:
isDirectoryin interfaceFileInfo- Specified by:
isDirectoryin interfacePlexusIoResource
-
isExisting
public boolean isExisting()Description copied from interface:PlexusIoResourceReturns, whether the resource exists.- Specified by:
isExistingin interfacePlexusIoResource
-
isFile
public boolean isFile()Description copied from interface:PlexusIoResourceReturns, whether theFileInforefers to a file.- Specified by:
isFilein interfaceFileInfo- Specified by:
isFilein interfacePlexusIoResource
-
isSymbolicLink
public boolean isSymbolicLink()Description copied from interface:FileInfoReturns, whether theFileInforefers to a symlink. This does not necessarily mean that the underlying representation *is* a symlink on disk, but that this resource represents a symlink. This method will return "false" for java versions prior to java7.- Specified by:
isSymbolicLinkin interfaceFileInfo
-