Specifications
Releases the current global data lock, if any. Does nothing if there
is no current lock.
unlockGlobalData( )
Switch automatically releases the current lock, if any, after a script
returns from the entry point. This is only a safeguard: a script should
explicitly release a lock as soon as it is no longer needed.
Copying files
Copies the file or folder (including its contents, recursively) specified by
the source path to the destination path. Both paths are absolute and
copy( source-path :
String,
destination-path :
String)
include a filename; that is, the destination path specifies the filename
of the copied file or folder, not the parent folder in which it should be
placed.
Files are copied with full support for platform-specific information such
as Mac file types and resource forks (including emulations on Windows),
as if copied by a regular flow operation under the control of Switch.
Note:
This function should be used only to copy files to a temporary location;
use the Job.sendTo() functions for moving files to outgoing connections.
Getting special property values
The following functions allow retrieving the value of the special properties “ApplicationPath”
and “ApplicationLicense” without requiring access to a Switch class instance. This is necessary
in a scripted plug-in to access these properties from with the getApplicationLicensing entry point.
See creating a scripted plug-in for more information on these special properties.
Returns the centrally managed absolute path to the third-party
application associated with this scripted plug-in or null if no
such path is available (yet).
getApplicationPath( ) : String
Returns the centrally managed license key for the third-party
application associated with this scripted plug-in or null if no
such license key is available (yet).
getApplicationLicense( ) :
String
Getting global user preferences
Returns the name of the Switch server hosting this execution, as
specified by the user in the communication preferences.
getServerName( ) : String
Returns the name entered in the Switch licensing dialog, or the
empty string if no name has been entered. If multiple licenses
getLicenseeName( ) : String
are activated, the license with the longest license time period is
used.
Returns the organization entered in the Switch licensing dialog,
or the empty string if no organization has been entered. If
getLicenseeOrganization( ) :
String
452
Enfocus Switch 10










