@@ -79,6 +79,9 @@ public class Resource implements Cloneable {
* only sets the name.
* only sets the name.
*
*
* <p>This is a dummy, used for not existing resources.</p>
* <p>This is a dummy, used for not existing resources.</p>
*
* @param name relative path of the resource. Expects
* "/" to be used as the directory separator.
*/
*/
public Resource(String name) {
public Resource(String name) {
this(name, false, 0, false);
this(name, false, 0, false);
@@ -86,11 +89,18 @@ public class Resource implements Cloneable {
/**
/**
* sets the name, lastmodified flag, and exists flag
* sets the name, lastmodified flag, and exists flag
*
* @param name relative path of the resource. Expects
* "/" to be used as the directory separator.
*/
*/
public Resource(String name, boolean exists, long lastmodified) {
public Resource(String name, boolean exists, long lastmodified) {
this(name, exists, lastmodified, false);
this(name, exists, lastmodified, false);
}
}
/**
* @param name relative path of the resource. Expects
* "/" to be used as the directory separator.
*/
public Resource(String name, boolean exists, long lastmodified,
public Resource(String name, boolean exists, long lastmodified,
boolean directory) {
boolean directory) {
this.name = name;
this.name = name;
@@ -107,11 +117,17 @@ public class Resource implements Cloneable {
* <p>example for a file with fullpath /var/opt/adm/resource.txt
* <p>example for a file with fullpath /var/opt/adm/resource.txt
* in a file set with root dir /var/opt it will be
* in a file set with root dir /var/opt it will be
* adm/resource.txt.</p>
* adm/resource.txt.</p>
*
* <p>"/" will be used as the directory separator.</p>
*/
*/
public String getName() {
public String getName() {
return name;
return name;
}
}
/**
* @param name relative path of the resource. Expects
* "/" to be used as the directory separator.
*/
public void setName(String name) {
public void setName(String name) {
this.name = name;
this.name = name;
}
}