Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-92 2601B-PULSE-901-01A April 2020
Also see
format.asciiprecision (on page 11-89)
format.byteorder (on page 11-89)
printbuffer() (on page 11-154)
printnumber() (on page 11-155)
fs.chdir()
This function sets the current working directory.
Usage
workingDirectory = fs.chdir("path")
Returned value containing the working path
A string indicating the new working directory path
Details
The new working directory path may be absolute or relative to the current working directory.
An error is logged to the error queue if the given path does not exist.
Example
if fs.is_dir("/usb1/temp") == true then
fs.chdir("/usb1/temp")
testPath = fs.cwd()
print(testPath)
else
testPath = fs.cwd()
print(testPath)
end
Insert a USB flash drive into the front panel of the instrument.
Verify that /usb1/temp is a directory and change it to be the current working directory.
Set the variable for the current working directory to be testPath.
The return should be:
/usb1/temp
If /usb1/temp is not a directory, set the variable for the current working directory to be testPath.
The return should be:
/usb1
Also see
None