System SourceMeter® Instrument Reference Manual  Section 7: TSP command 
 
2600BS-901-01 Rev. B / May 2013  7-95 
 
fs.chdir() 
This function sets the current working directory. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
   
 
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 
 
testPath = fs.chdir("/usb1/") 
Change the working directory to usb1. 
 
Also see 
None 
 
fs.cwd() 
This function returns the absolute path of the current working directory. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
Function  Yes 
   
 
 
Usage 
path = fs.cwd() 
 
The absolute path of the current directory 
 
 
Also see 
None 
 
fs.is_dir() 
This function tests whether or not the specified path refers to a directory. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
Function  Yes