User manual

Series 3700 System Switch/Multimeter Reference Manual Section 9: Files
3700S-901-01 Rev. C / July 2008 9-13
io.input()
Remarks
Any error encountered is logged to the error queue.
The remotely-accessible version of this command does not accept a file descriptor
parameter.
io.open()
Function
Opens a file for later access.
Usage
file, err, errnum = io.open(path, mode)
file: The descriptor of the opened file.
err: A string with an error message an error occurred.
errnum: Number representing the error number.
path: The path of the file to open. This path may be absolute or relative to the current
working directory.
mode: A string representing the intended access mode. The mode attribute is
optional; the default is "r".
Remarks
The mode string can be any of the standard C language fopen modes, including:
"r": Read mode.
"w": Write mode.
"a": Append mode.
If an error is encountered, it is logged to the error queue, and the command returns
nil and the error string.
This command is not remotely accessible.
io.output()
Function
Assigns a previously opened file or opens a new file as the default output file.
Usage
io.output(filein)
fileout = io.output()
filein: A file descriptor to assign, or the path of a file to open, as the default output file.
The path may be absolute or relative to the current working directory. This parameter
is optional; if absent, the command returns the absolute path to the current default
output file (fileout).
fileout: The absolute path to the default output file.
Remarks
Any error encountered is logged to the error queue.
The remotely-accessible version of this command does not accept a file descriptor
parameter.