Tektronix KEITHLEY SourceMeter 2606B Reference Manual page 478

Table of Contents

Advertisement

Model 2606B System SourceMeter® Instrument Reference Manual
Example 1
print("Is directory: ", fs.is_dir("/usb1/"))
Because /usb1/ is always the root directory of an inserted flash drive, you can use this command to verify that
USB flash drive is inserted.
Example 2
if fs.is_dir("/usb1/temp") == false then
fs.mkdir("/usb1/temp")
end
Insert a USB flash drive into the front panel of the instrument.
Check to see if the temp directory exists.
If it does not exist, create a directory named temp.
Also see
fs.is_file()
(on page 15-105)
fs.is_file()
Tests whether the specified path refers to a file (as opposed to a directory).
Type
TSP-Link accessible
Function
Yes
Usage
status = fs.is_file("path")
status
path
Details
The file system path may be absolute or relative to the current working system path.
Example
rootDirectory = "/usb1/"
print("Is file: ", fs.is_file(rootDirectory))
Insert a USB flash drive into the front panel of the instrument.
Set rootDirectory to be the USB port.
Check to see if rootDirectory is a file. Because rootDirectory was set up as a directory, the return is
false.
Also see
fs.is_dir()
(on page 15-104)
2606B-901-01 Rev. C November 2021
Affected by
Where saved
true if the given path is a file; otherwise, false
The path of the file system entry to test
Section 15: TSP command reference
Default value
15-105

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents