public abstract class AbstractPlexusIoResource extends Object implements PlexusIoResource
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE| Constructor and Description |
|---|
AbstractPlexusIoResource()
Creates a new instance with default settings.
|
| 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. |
void |
setDirectory(boolean isDirectory)
Sets, whether the resource is a directory.
|
void |
setExisting(boolean isExisting)
Sets, whether the resource exists.
|
void |
setFile(boolean isFile)
Sets, whether the resource is a file.
|
void |
setLastModified(long lastModified)
Sets the date, when the resource was last modified.
|
void |
setName(String name)
Sets the resources name, which may include path components,
like directory names, or something like that.
|
void |
setSize(long size)
Sets the resources size.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetURLgetContentspublic AbstractPlexusIoResource()
public void setLastModified(long lastModified)
Date - of last modification, if known.
Otherwise, PlexusIoResource.UNKNOWN_MODIFICATION_DATE.File.lastModified()public long getLastModified()
PlexusIoResourcePlexusIoResource.UNKNOWN_MODIFICATION_DATE.getLastModified in interface PlexusIoResourceFile.lastModified()public void setName(String name)
File.pathSeparatorpublic String getName()
FileInfoFile.pathSeparatorpublic void setSize(long size)
size - The resources size, if known. Otherwise returns
PlexusIoResource.UNKNOWN_RESOURCE_SIZE.File.length()public long getSize()
PlexusIoResourcePlexusIoResource.UNKNOWN_RESOURCE_SIZE.getSize in interface PlexusIoResourcepublic void setDirectory(boolean isDirectory)
public boolean isDirectory()
FileInfoFileInfo refers to a directory.isDirectory in interface FileInfopublic void setExisting(boolean isExisting)
public boolean isExisting()
PlexusIoResourceisExisting in interface PlexusIoResourcepublic void setFile(boolean isFile)
Copyright © 2001-2014 Codehaus. All Rights Reserved.