Specifications

This function does not differentiate between prerelease and release
builds.
This function was introduced in Switch 08 update 6. If a script may
be hosted by an older version of Switch, the script should check for
the presence of this function before using it. For example:
if ("getServerVersion" in s && s.getServerVersion() >= 8.07)
...
Supporting time-out
Returns the number of seconds left before the maximum allotted execution
time ("abort processes after" in error handling preferences), is reached for
getSecondsLeft( ) :
Number
this entry point. This allows a script to fail gracefully when it detects that
it is getting close to being aborted, or to choose different algorithms based
on the allotted time.
Switch provides no guarantees about the actual CPU time that will be
available to the script (since many other tasks may be executing in parallel).
Sleeping
Blocks the calling script for approximately the specified amount
of time (in seconds). Other Switch processes are allowed to
continue execution in parallel.
sleep ( seconds : Number )
Compressing
Places the source file or folder (including its nested contents)
into a ZIP archive at the destination path, using the specified
compress( source-path :
String, destination-path :
String, password : String,
password. If the password is null or missing, the archive is not
password-protected.
compress : Boolean ) :
Boolean
By default (that is, if the compress argument is true, missing or
null), the files in the ZIP archive are compressed. If the compress
argument is false, the files are stored in the ZIP archive without
compression, dramatically reducing processing time. This can be
meaningful when speed is more important than size or when
the files will not compress well (example: JPEG images).
Returns true if successful, false if not (in which case an
appropriate error message is logged).
This function behaves exactly as the compress tool (except that
it does not add a unique name prefix to the output archive’s
name).
Extracts all files from the archive at the source path and places
them as a file or folder at the destination path. If the third
uncompress( source-path :
String, destination-path :
String,
argument is set to yes, all but the deepest subfolder levels are
remove-redundant-folders :
removed while uncompressing. The last (optional) argument
Boolean, passwords : String[
] ) : Boolean
456
Enfocus Switch 10