Tektronix KEITHLEY SourceMeter 2606B Reference Manual page 480

Table of Contents

Advertisement

Model 2606B System SourceMeter® Instrument Reference Manual
fs.readdir()
This function returns a list of the file system entries in the directory.
Type
TSP-Link accessible
Function
Yes
Usage
files = fs.readdir("path")
files
path
Details
The directory path may be absolute or relative to the current working directory.
This command is nonrecursive. For example, entries in subfolders are not returned.
An error is logged to the error queue if the given path does not exist or does not represent a directory.
Example
rootDirectory = "/usb1/"
entries = fs.readdir(rootDirectory)
count = table.getn(entries)
print("Found a total of "..count.." files and directories")
for i = 1, count do
print(entries[i])
end
Insert a USB flash drive into the front panel of the instrument.
Set rootDirectory to be the USB port.
Set entries as the variable for the file system entries in rootDirectory.
Return the number of files and directories in the directory.
Also see
None
fs.rmdir()
This function removes a directory from the file system.
Type
TSP-Link accessible
Function
Yes
Usage
fs.rmdir("path")
path
2606B-901-01 Rev. C November 2021
Affected by
Where saved
A table containing the names of all the file system entries in the specified directory
The directory path
Affected by
Where saved
The path of the directory to remove
Section 15: TSP command reference
Default value
Default value
15-107

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?

Subscribe to Our Youtube Channel

Table of Contents