FileInfo, ContentSupplier, NameSupplier, SizeSupplier, PlexusIoResourcePlexusIoFileResource, PlexusIoURLResourcepublic abstract class AbstractPlexusIoResource extends java.lang.Object implements PlexusIoResource
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractPlexusIoResource(java.lang.String name,
long lastModified,
long size,
boolean isFile,
boolean isDirectory,
boolean isExisting) |
| Modifier and Type | Method | Description |
|---|---|---|
long |
getLastModified() |
Returns the date, when the resource was last modified, if known.
|
java.lang.String |
getName() |
Returns the resources name, which may include path components,
like directory names, or something like that.
|
long |
getSize() |
Returns the resources size, if known.
|
boolean |
isDirectory() |
Returns, whether the
FileInfo refers to a directory. |
boolean |
isExisting() |
Returns, whether the resource exists.
|
boolean |
isFile() |
Returns, whether the
FileInfo refers to a file. |
boolean |
isSymbolicLink() |
Returns, whether the
FileInfo refers to a symlink. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContents, getURLprotected AbstractPlexusIoResource(@Nonnull
java.lang.String name,
long lastModified,
long size,
boolean isFile,
boolean isDirectory,
boolean isExisting)
public long getLastModified()
PlexusIoResourcePlexusIoResource.UNKNOWN_MODIFICATION_DATE.getLastModified in interface PlexusIoResourceFile.lastModified()@Nonnull public java.lang.String getName()
FileInfoFile.pathSeparatorgetName in interface FileInfogetName in interface NameSupplierpublic long getSize()
PlexusIoResourcePlexusIoResource.UNKNOWN_RESOURCE_SIZE.getSize in interface PlexusIoResourcegetSize in interface SizeSupplierpublic boolean isDirectory()
PlexusIoResourceFileInfo refers to a directory.isDirectory in interface FileInfoisDirectory in interface PlexusIoResourcepublic boolean isExisting()
PlexusIoResourceisExisting in interface PlexusIoResourcepublic boolean isFile()
PlexusIoResourceFileInfo refers to a file.isFile in interface FileInfoisFile in interface PlexusIoResourcepublic boolean isSymbolicLink()
FileInfoFileInfo refers 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.isSymbolicLink in interface FileInfo