Section 7: TSP command reference
fs.is_dir()
This function tests whether or not the specified path refers to a directory.
Type
TSP-Link accessible
Function
Yes
Usage
status = fs.is_dir("path")
status
path
Details
The file system path may be absolute or relative to the current working system path.
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 7-117)
7-116
Model 2651A High Power System SourceMeter® Instrument Reference Manual
Affected by
Where saved
Whether or not the given path is a directory (true or false)
The path of the file system entry to test
Default value
2651A-901-01 Rev. C October 2021
Need help?
Do you have a question about the Keithley 2651A and is the answer not in the manual?