Section 7: TSP command reference
2606B System SourceMeter® Instrument Reference Manual
7-96
2606B-901-01 Rev. B / May 2018
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()
path
The absolute path of the current working 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
Usage
status
= fs.is_dir(
path
)
status
Whether or not the given path is a directory (
true
or
false
)
path
The path of the file system entry to test
Details
The file system path may be absolute or relative to the current working system path.
Also see
(on page 7-96)
fs.is_file()
Tests whether the specified path refers to a file (as opposed to a directory).
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
status
= fs.is_file(
path
)
status
true
if the given path is a file; otherwise,
false
path
The path of the file system entry to test
Details
The file system path may be absolute or relative to the current working system path.