![background image](http://html2.mh-extra.com/html/keithley/2657a/2657a_reference-manual_4007750401.webp)
Section 7: TSP command reference
Model 2657A High Power System SourceMeter® Instrument Reference Manual
7-88
2657A-901-01 Rev. B/December 2012
fileVar:close()
This function closes the file that is represented by the
fileVar
variable.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
fileVar:
close()
fileVar
The file descriptor variable to close
Details
This command is equivalent to
io.close(
fileVar
)
.
Note that files are automatically closed when the file descriptors are garbage collected.
Also see
(on page 7-88)
(on page 7-90)
(on page 7-90)
(on page 7-105)
fileVar:flush()
This function writes buffered data to a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
fileVar
:flush()
fileVar
The file descriptor variable to flush
Details
The
fileVar
:write()
or
io.write()
functions buffer data, which may not be written immediately to the
USB flash drive. Use
fileVar
:flush()
to flush this data. Using this function removes the need to close a file
after writing to it, allowing the file to be left open to write more data. Data may be lost if the file is not closed or
flushed before a script ends.
If there is going to be a time delay before more data is written to a file, and you want to keep the file open, flush
the file after you write to it to prevent loss of data.
Also see
(on page 7-90)
(on page 7-105)
(on page 7-107)
Содержание 2657A
Страница 3: ......