public abstract class AbstractPlexusIoResource extends Object implements PlexusIoResource
PlexusIoResource
.UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE
Modifier | Constructor and Description |
---|---|
protected |
AbstractPlexusIoResource(String name,
long lastModified,
long size,
boolean isFile,
boolean isDirectory,
boolean isExisting) |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Returns the date, when the resource was last modified, if known.
|
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, wait
getContents, getURL
public long getLastModified()
PlexusIoResource
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
.getLastModified
in interface PlexusIoResource
File.lastModified()
@Nonnull public String getName()
FileInfo
File.pathSeparator
getName
in interface FileInfo
getName
in interface NameSupplier
public long getSize()
PlexusIoResource
PlexusIoResource.UNKNOWN_RESOURCE_SIZE
.getSize
in interface SizeSupplier
getSize
in interface PlexusIoResource
public boolean isDirectory()
PlexusIoResource
FileInfo
refers to a directory.isDirectory
in interface FileInfo
isDirectory
in interface PlexusIoResource
public boolean isExisting()
PlexusIoResource
isExisting
in interface PlexusIoResource
public boolean isFile()
PlexusIoResource
FileInfo
refers to a file.isFile
in interface FileInfo
isFile
in interface PlexusIoResource
public boolean isSymbolicLink()
FileInfo
FileInfo
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
Copyright © 2001–2019 Codehaus Plexus. All rights reserved.