Accessing System Information with SenseTalk
These functions provide information about various aspects of the system where the SenseTalk script is running.
DiskSpace Function
Behavior: Returns the number of bytes of free space available on a disk.
Use the diskSpace function to find out how much free space (in bytes) is available on a file system.
Parameters: The name of an existing file or folder. Optional.
If the diskSpace function is called without any parameter, it returns the amount of free space in bytes in the file system containing the current working folder. If a parameter is given, it should be the name of an existing file or folder, and diskSpace will return the amount of free space on the file system containing that file or folder.
If fileOrFolder is not specified, the diskSpace function returns the amount of space available on the volume containing the current working folder, as indicated by the folder global property.
Syntax:
the diskSpace {of fileOrFolder} diskSpace({fileOrFolder})
Example:
put diskSpace() into spaceRemaining
if diskspace is less than a Megabyte then
put "You have less than a megabyte of space remaining!"
end if
if diskSpace("/Volumes/sparky") is less than 1000 then
put "Less than a thousand bytes left on /Volumes/sparky!!"
end if
EggplantVersion Function
Behavior: Returns the number of your version of Eggplant Functional.
Parameters: None.
Returns: The number of your version of Eggplant Functional. For example: Eggplant 19.2.1-Windows
Example:
log the eggplantVersion