This file parameter creates an associated port that can be used to update the current value of the parameter. The value of this parameter, is a string that names a file or URL.
If the model containing this port parameter has been saved to a MoML file, then the file name can be given relative to the directory containing that MoML file. If the model has not been saved to a file, then the classpath is used for identifying relative file names.
Files can be given relative to a base, where the base is the URI of the first container above this one that has a URIAttribute. Normally, this URI specifies the file or URL containing the model definition. Thus, files that are referred to here can be kept in the same directory as the model, or in a related directory, and can moved together with the model.
The following special file names are understood:
Note, however, that these file names cannot be converted to URLs using the asURL() method. A file name can also contain the following strings that start with "$", which get substituted with the appropriate values. $CWDThe current working directoryuser.dir$HOMEThe user's home directoryuser.home$VSThe home directory of the VisualSim installationVisualSim.VS.dir$TMPDIRThe temporary directoryjava.io.tmpdir
String |
Description |
Property |
The above properties are normally set when a VisualSim application starts.
If a file name begins with the reference "$CLASSPATH", then when the file is opened for reading, the openForReading() method will search for the file relative to the classpath (using the getResource() method of the current class loader). This will only work for a file that exists, and thus the openForWriting() method will not understand the "$CLASSPATH" string; this makes sense since the classpath typically has several directories, and it would not be obvious where to create the file. The asURL() method also recognizes the "$CLASSPATH" string, but not the asFile() method (which is typically used when accessing a file for writing). NOTE: If the container of this parameter also contains a variable named CLASSPATH, then the value of that variable is used instead of the Java classpath.
Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation