For information about Globalscape, visit www.globalscape.com. |
Use methods and properties to operate the Transfer Engine. Methods and properties are defined below.
Methods
A method can be described as a command or function that may accept arguments (parameters) and may return a certain type of value. For example:
Boolean Object.LocalExists(BSTR bstrName);
For this method, the type of the return value is Boolean. The command accepts an argument as a string value, here shown as BSTR (the type) and bstrName (a place holder for the argument).
In a program, you can execute a method and assign the return value to a variable all in one command. For example
Exists = MySite.LocalExists "c:\temp\file.txt"
The argument "c:\temp\file.txt exists" is passed to the method LocalExists as a string (reason for the quotes). The variable Exists is then populated with a 1 or a 0 which is, in essence, true or false. You can then perform actions in your script based on those results.
Properties
A property is simply an attribute of a function (another word for method) or object internal to the TE framework. All properties have default values. Methods that rely on these properties will use default values unless you specify otherwise.
Most of the time, you can assign a value to a property or retrieve its value into a variable. You can set a property much like a local variable to your script. For example
String Object.Protocol
The above property can accept a predefined set of string values or can be assigned to a variable to retrieve the currently selected value. The default in this case is "FTP".
You can assign a value to a property as follows:
MySite.Protocol = "FTPS"
Upon subsequent connections, the TE will attempt to login using FTP over SSL, rather then via FTP, the default attribute for this property.
Wildcard Masks
Wildcard masks are patterns of special characters used to filter file names. When a wildcard mask is matched against a file name, the two patterns are compared, letter-by-letter, from left to right until a mismatch occurs. If all the characters in both patterns compare positively, the file name matches the Wildcard Mask.