| java.lang.Object net.sourceforge.groboutils.codecoverage.v2.ant.zip.Resource
Resource | public class Resource implements Cloneable,Comparable(Code) | | describes a File or a ZipEntry
this class is meant to be used by classes needing to record path
and date/time information about a file, a zip entry or some similar
resource (URL, archive in a version control repository, ...)
author: Antoine Levy-Lambert since: Ant 1.5.2 |
Constructor Summary | |
public | Resource() | public | Resource(String name) only sets the name.
This is a dummy, used for not existing resources.
Parameters: name - relative path of the resource. | public | Resource(String name, boolean exists, long lastmodified) sets the name, lastmodified flag, and exists flag
Parameters: name - relative path of the resource. | public | Resource(String name, boolean exists, long lastmodified, boolean directory) Parameters: name - relative path of the resource. |
Resource | public Resource()(Code) | | default constructor
|
Resource | public Resource(String name)(Code) | | only sets the name.
This is a dummy, used for not existing resources.
Parameters: name - relative path of the resource. Expects"/" to be used as the directory separator. |
Resource | public Resource(String name, boolean exists, long lastmodified)(Code) | | sets the name, lastmodified flag, and exists flag
Parameters: name - relative path of the resource. Expects"/" to be used as the directory separator. |
Resource | public Resource(String name, boolean exists, long lastmodified, boolean directory)(Code) | | Parameters: name - relative path of the resource. Expects"/" to be used as the directory separator. |
compareTo | public int compareTo(Object other)(Code) | | delegates to a comparison of names.
since: Ant 1.6 |
getLastModified | public long getLastModified()(Code) | | tells the modification time in milliseconds since 01.01.1970 of
0 if the resource does not exist to mirror the behaviorof java.io.File File. |
getName | public String getName()(Code) | | name attribute will contain the path of a file relative to the
root directory of its fileset or the recorded path of a zip
entry.
example for a file with fullpath /var/opt/adm/resource.txt
in a file set with root dir /var/opt it will be
adm/resource.txt.
"/" will be used as the directory separator.
|
isDirectory | public boolean isDirectory()(Code) | | tells if the resource is a directory
boolean flag indicating if the resource is a directory |
isExists | public boolean isExists()(Code) | | the exists attribute tells whether a file exists
|
setDirectory | public void setDirectory(boolean directory)(Code) | | |
setExists | public void setExists(boolean exists)(Code) | | |
setLastModified | public void setLastModified(long lastmodified)(Code) | | |
setName | public void setName(String name)(Code) | | Parameters: name - relative path of the resource. Expects"/" to be used as the directory separator. |
|
|