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, wait
getURL
getContents
public AbstractPlexusIoResource()
public void setLastModified(long lastModified)
Date
- of last modification, if known.
Otherwise, PlexusIoResource.UNKNOWN_MODIFICATION_DATE
.File.lastModified()
public long getLastModified()
PlexusIoResource
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
.getLastModified
in interface PlexusIoResource
File.lastModified()
public void setName(String name)
File.pathSeparator
public String getName()
FileInfo
File.pathSeparator
public void setSize(long size)
size
- The resources size, if known. Otherwise returns
PlexusIoResource.UNKNOWN_RESOURCE_SIZE
.File.length()
public long getSize()
PlexusIoResource
PlexusIoResource.UNKNOWN_RESOURCE_SIZE
.getSize
in interface PlexusIoResource
public void setDirectory(boolean isDirectory)
public boolean isDirectory()
FileInfo
FileInfo
refers to a directory.isDirectory
in interface FileInfo
public void setExisting(boolean isExisting)
public boolean isExisting()
PlexusIoResource
isExisting
in interface PlexusIoResource
public void setFile(boolean isFile)
Copyright © 2001-2013 Codehaus. All Rights Reserved.