2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-97
Also see
(on page 7-96)
fs.mkdir()
This function creates a directory at the specified path.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
path
= fs.mkdir(
new
P
ath
)
path
The returned path of the new directory
newpath
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.
Also see
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.
Also see
None