EasyManua.ls Logo

Tektronix KEITHLEY 2600B Series

Tektronix KEITHLEY 2600B Series
834 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 9: TSP command reference Series 2600B System SourceMeter® instrument Reference Manual
9-106 2600BS-901-01 Rev. F/August 2021
Example
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.rmdir() (on page 9-107)
fs.readdir()
This function returns a list of the file system entries in the directory.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
files = fs.readdir("path")
files
A table containing the names of all the file system entries in the specified directory
path
The directory 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

Table of Contents

Related product manuals