FTP (File Transfer Protocol) Driver

Modified on 2010/12/15 10:32 by Administrator — Categorized as: Driver

The ftp driver allows uploading and downloading files using FTP (File Transfer Protocol) from any machine running the driver.

Accessing files is done under the context of the user that the driver service is running under. This can cause some file permissions/access rights issues if the file does not allow access to that user.

Manufacturer: N/A

Primary Communications Port: Network


Configuration Settings

Events

Ready State Changed

The device's running and ready state changed.

Whenever Filter:

none

EventArgs:


Instance Properties

DeviceDisplayName

The display name for this device.

Accessibility : Read Only

Type: String

DeviceStartTime

The date and time when this device was started.

Accessibility : Read Only

Type: DateTime

DeviceLifecycleStage

The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping

Accessibility : Read Only

Type: Number

DeviceIsRunningAndReady

Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.

Accessibility : Read Only

Type: Boolean

Instance Methods

Upload ( String, String )

Sends a file using anonymous authentication.

Syntax

void Upload( String hostName, String fileName )

Parameters

hostName : The host name to upload the file to.
fileName : The path to the file to upload.

Upload ( String, String, String, String )

Sends a file.

Syntax

void Upload( String hostName, String fileName, String ftpUserID, String ftpPassword )

Parameters

hostName : The host name to upload the file to.
fileName : The path to the file to upload.
ftpUserID : The user name to use while authenticating.
ftpPassword : The password to use while authenticating.

Download ( String, String, String )

Retrieves a file using anonymous authentication.

Syntax

void Download( String hostName, String hostFilePath, String localFilePath )

Parameters

hostName : The host name to download the file from.
hostFilePath : The path to the file to download.
localFilePath : The destination path on the local matching to download the the file to.

Download ( String, String, String, String, String )

Retrieves a file.

Syntax

void Download( String hostName, String hostFilePath, String localFilePath, String ftpUserID, String ftpPassword )

Parameters

hostName : The host name to download the file file.
hostFilePath : The path to the file to download.
localFilePath : The destination path on the local matching to download the the file to.
ftpUserID : The user name to use while authenticating.
ftpPassword : The password to use while authenticating.

SetPropertyForDuration ( String, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, Number arrayIndex, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.