edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing

ScriptEngine Class

Scripting engine, used to load FTP scripts and execute them. Generally, the only methods used should be the constructor and the ExecuteScript() methods. The setter methods should be used with caution. Typically, when the script is run these setter methods are called to set various properties. This means any properties manually set with these methods will be overwritten.

Definition

Namespace: EnterpriseDT.Net.Ftp.Script
Assembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.7.0.0
C#
public class ScriptEngine
Inheritance
Object    ScriptEngine

Constructors

ScriptEngine Default constructor @throws IOException
ScriptEngine(String, String) Constructor. Allows user name and password to be passed in

Properties

ActiveHighPort Get the high port for active mode
ActiveLowPort Get the low port for active mode
ClientCertificate Get the path of the client certificate for FTPS
ClientPassphrase Get the passphrase used for the client certificate
ClientPrivateKey Get the client private key path
ClientPrivateKeyPass Get the passphrase for the client private key
CommandMap Get the map of commands
CommonName Get the set common name for the server. This is what is used to match against the server certificate if the hostname is not to be used.
ConnectMode Get the connect mode. PASV by default.
Debug Is debug turned on? Prints out each line before execution if on.
EchoCommand 
Ftp Get a reference to the client being used
IgnoreCommonName Get the setting for ignoring the common name in server certificate validation. This is only used if a server certificate is set. If set to true, the common name in the server certificate is not matched with the hostname of the server (or any set common names). The default is false.
KnownHosts Get the known hosts path
LicenseProperties Get and set license details
LocalDir Get the local working directory
LogFile Get the name (or full path) of the log file
LogLevel Get the log level
MaxSSLVersion Set or get the maximum version of SSL/TLS to be used
Password Get the user's password
Port Get the port number being used. The default is 0, which means the port will be set internally depending on the protocol used.
Protocol Get the protocol to be used
RecordFile Get path of file used to record script to
Recording Is the engine currently recording commands?
RemoteHost Get the remote host name
ServerPublicKey Get the server public key path
ServerValidation If true, the server certificate must be validated against the root certificate in the Windows store
Timeout Get the timeout value in seconds. The default is 0, which is an infinite timeout.
User Get the user
VariablesMap Get the map of variables

Methods

CanConnect Can we connect with the current state?
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
ExecuteScript(StreamReader) Execute the script in the supplied stream
ExecuteScript(String) Execute the script in the supplied file
ExecuteScript(StreamReader, Boolean) Execute the script in the supplied stream.
ExecuteScript(String, Boolean) Execute the script in the supplied file
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVariable Get a variable that has been set
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Quit Quit the session
RunCommand Run a command and write the output
SetActivePortRange Set the active mode port range to be used
SetVariable Set a variable
StartRecording Start recording commands to file
StopRecording Stop recording commands @throws IOException
ToStringReturns a string that represents the current object.
(Inherited from Object)
WriteToRecordFile Write a line to the script record file

See Also