
2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-151
If this function fails, it returns
nil
(for
success
) and an error message string (for
msg
).
Example
os.remove("testFile")
Delete the file named
testFile
.
Also see
(on page 7-151)
os.rename()
This function renames an existing file or directory.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
success
,
msg
= os.rename(
oldname
,
newname
)
success
A success indicator (
true
or
nil
)
msg
A message value (
nil
or an error message)
oldname
String representing the name of the file or directory to rename
newname
String represent the new name of the file or directory
Details
If this function fails, it returns
nil
(for
success
) and an error message string (for
msg
).
Example
os.rename("testFile", "exampleFile")
Changes the name of the existing file
testFile
to the name
exampleFile
.
Also see
(on page 7-150)
os.time()
This function generates a time value in UTC time.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
utcTime
= os.time()
utcTime
= os.time(
timespec
)
utcTime
Time value in UTC time
timespec
The date and time (year, month, day, hour, and minute)
Details
The
timespec
is a table using the fields listed in the table below.