if (action.equals("remove")) {
//get the parent resource of our own resource
ResourceReference rr = getResource().getParent();
try {
Resource res = rr.lock();
DirectoryResource dirres = null;
if (! (res instanceof DirectoryResource)) {
getServer().errlog(res,
"CvsFrame: not a child of a DirectoryResource");
return error(this, request,
"The server is misconfigured.",
"The CVS Directory is not a children of a"+
"Directory Resource.");
}
dirres = (DirectoryResource) res;
for (int i=0; i < size; i++ ) {
String name = names[i];
ResourceReference childref = dirres.lookup(name);
if (childref != null) {
try {
Resource children = childref.lock();
if (children instanceof FileResource) {
FileResource fres =
(FileResource) children;
// delete the file
fres.getFile().delete();