Filevar:close(); Filevar:flush() - Keithley 2601B Reference Manual

2600b series system sourcemeter instrument
Hide thumbs Also See for 2601B:
Table of Contents

Advertisement

Series 2600B System SourceMeter® Instrument Reference Manual

fileVar:close()

This function closes the file that is represented by the fileVar variable.
Type
TSP-Link accessible
Function
No
Usage
fileVar:close()
fileVar
Details
This command is equivalent to io.close(fileVar).
Note that files are automatically closed when the file descriptors are garbage collected.
Also see

fileVar:flush()

fileVar:read()
fileVar:seek()
fileVar:write()
io.close()
io.open()
fileVar:flush()
This function writes buffered data to a file.
Type
TSP-Link accessible
Function
No
Usage
fileVar:flush()
fileVar
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
fileVar:write()
io.open()
io.write()
2600BS-901-01 Rev. B / May 2013
Affected by
The file descriptor variable to close
(on page 7-89)
(on page 7-90)
(on page 7-91)
(on page 7-91)
(on page 7-106)
(on page 7-108)
Affected by
The file descriptor variable to flush
(on page 7-91)
(on page 7-108)
(on page 7-111)
Section 7: TSP command reference
Where saved
Default value
Where saved
Default value
7-89

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents