Casts a file as an object. Requires the name and path to a file as a parameter, in addition to the open and read mode indicators.
When a file connection is opened using the [File] tag, several different open modes can be used. These modes optimize the file connection for best performance depending on the purpose of the connection. A read mode may also be specified to determine how the file will be read (by line or by character). The open and read modes are described below.
[Var:'File Variable'=(File: 'file name', Open Mode, Read Mode)]
|'File path'||The name and path to a file.|
|Open Mode||The open mode defines the purpose and permissions of the file connection, and may be one of the following values:
|Read Mode||The read mode defines whether the file will be read by line or by character when using the [File->Get] tag, and may be one of the following values:
Use the [File] tag. The example below casts a local file named myfile.txt as an LDML object in read-only/character mode. Note that no single quotes are used around the open and read mode designators, as they are type constants and not strings.
[Var:'File'=(File: 'myfile.txt', (File_OpenRead), (File_ModeChar))]
|Implementation||LCAPI||Sets||Lasso 8.5, Lasso 8.0, Lasso 7.0|
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.