Model 2601B-PULSE System SourceMeter Instrument Reference Manual Section 11: TSP command reference
2601B-PULSE-901-01A April 2020 11-95
fs.mkdir()
This function creates a directory at the specified path.
Usage
path = fs.mkdir("newPath")
The returned path of the new directory
Location (path) of where to create the new directory
Details
The directory path may be absolute or relative to the current working directory.
An error is logged to the error queue if the parent folder of the new directory does not exist, or if a file
system entry already exists at the given path.
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 11-96)
fs.readdir()
This function returns a list of the file system entries in the directory.
Usage
files = fs.readdir("path")
A table containing the names of all the file system entries in the specified directory
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.