brahms.io
Class DeleteFileActivity
java.lang.Object
gov.nasa.arc.brahms.vm.api.jac.AbstractExternalActivity
brahms.io.DeleteFileActivity
- All Implemented Interfaces:
- IExternalActivity
public class DeleteFileActivity
- extends AbstractExternalActivity
The DeleteFileActivity allows a modeler to delete a file or
folder. The file/folder to be deleted must be an absolute path to
the file/folder. The filename may contain wildcards (* and ?), but
only in the last name in the path. If the specified file/folder does
not exist the activity will silently succeed assuming that the file
was already deleted. If the isFolder flag is set to true and the
filename does not specify a folder the delete will fail. If the
isFolder is set to false (default) and the filename specifies a
folder the delete will also fail.
This activity requires two parameters in the Brahms java activity
declaration and one optional parameter:
- string filename (the absolute path of the file to be deleted)
- boolean isFolder (optional, specifies whether the file is supposed to be a folder - default: false)
- boolean success (return value indicating whether the delete succeeded)
- string errorMessage (optional, return value specifying the reason for the failure,
possible values:
NotADirectory - if the specified filename is not for a directory
NotAFile - if the specified filename is a directory and not a file
NoSuchDirectory - if the directory specified as part of a filename does not exist
UnexpectedFailure - if there was an unexpected failure)
- Version:
- $Revision: 1.4 $ $Date: 2007/12/19 19:03:55 $ $Author: rvhoof $
- Author:
- Ron van Hoof
|
Method Summary |
void |
doActivity()
Executes the java activity action. |
| Methods inherited from class gov.nasa.arc.brahms.vm.api.jac.AbstractExternalActivity |
assertBelief, assertFact, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, getContext, getModel, getName, getParameter, getParameterCount, getPerformedBy, getVMController, getWorldState, isValidTruthValue, retractBelief, retractFact, send, send, send, send, setActivity, setProperties, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DeleteFileActivity
public DeleteFileActivity()
doActivity
public void doActivity()
throws ExternalException
- Executes the java activity action.
- Specified by:
doActivity in interface IExternalActivity- Specified by:
doActivity in class AbstractExternalActivity
- Throws:
ExternalException - if an unrecoverable error occurs.- See Also:
AbstractExternalActivity.doActivity()
Copyright © 1997-2008 NASA. All Rights Reserved.