NTAdvFTP61.Client ActiveX DLL



Identification

NTAdvFTP61.Client

Description

This is the core FTP object in Max-FTP.

Enumerators

ConnectedStates

NotState = 0

AllStates = -1

LocalHardDisk = 1

SocketNetwork = 2

LoggingInto = 4

FullyRemoting = 8

CommandRequest = 16

ListingToFile = 32

LocalToLocal = 64

LocalToRemote = 128

RemoteToLocal = 256

DataStreaming = 512

ConnectionModes

Passive  = 0
Active = 1

TransferModes

None  = -1
Binary = 0
ASCII = 1

RateTypes

HardDrive = 0
Download = 1
Upload = 2

ErrorReturns

Wait = -1

None  = 0
Last = 1

ListSystems

None  = 0
Wins = 1
Unix = 2

ProgressTypes

FileListing = 0
AllocatingFile = 1
PositioningFile= 2

TransferingFile = 3

AllocateSides

None = 0
Client = 1
Remote  = 2

MessageTypes

Outgoing = 1
Incoming = 2
Incorrect  = 3

Events

Error (Number, Source, Description)

Parameters

Number Long

Returns the error number raised.

Source String

Returns the source of the error raised.

Description String

Returns the description of the error raised.

Description

This event fires when an error occurs from the server while FTP processing.

LogMessage (MessageType, AddedText)

Parameters

MessageType MessageTypes

Specifies the type of message that was added to the log.

AddedText String

The text that was added to the log.

Description

Rises whenever the FTP log changes data.

ItemListing (ItemName, ItemSize, ItemDate, ItemAccess)

Parameters

ItemName String

Specifies the file or folder name. Folders start with "/".

ItemSize String

Specifies the file or folder size.

ItemDate String

Specifies the file or folder date.

ItemAccess String

Specifies the file of folder access (Non MS-DOS).

Description

This event is raised for every item that is successfully parsed with the PraseListing function.

DataProgress (ProgressType, ReceivedBytes)

Parameters

ProgressType ProgressTypes

Specifies the type of progress this event is being called about.

ReceivedBytes Long

Specifies the total amount of bytes received for the listing or file transfer.

Description

This event occurs when data is received during a listing transfer.

DataComplete (ProgressType)

Parameters

ProgressType ProgressTypes

Specifies the type of progress this event is being called about.

Description

This event is raised when listing of directory contents is complete.

Properties

PauseTransfers (Boolean)

Description

Specifies whether or not the object or any object connected in transfer is paused or in active transfer.

PauseOnStandBy (Boolean)

Description

Specifies whether the object will halt transfers when the system goes into standby.

LargeFileMode (Boolean)

Description

Specifies whether or not to allow file sizes over 2 gigabytes (or 2147483647 bytes), the maximum file size with this set is 9223372036854780000 bytes with this enabled. Files are opened in shared mode when this is disabled. This option may auto enabled determinate of the file size, however listing it likely will not if you have a  listing over 2 gigabytes, of which you would need this enabled.

ConnectedState([Check]) (Boolean) (ReadOnly)

Parameters

[Check] ConnectedStates

Optional state to check on specifically for the return value of the property to reflect.  Omitted the return is whether the object is connected or not, including the logged in state of the object.

Description

Returns whether or not the object is connected and logged in, when Check is specified the state specifically reflects the Check only.

AdapterCount (Long)

Description

Returns the number of adapters in the AllAdapters collection.

AllAdapters (Collection)

Description

Returns a collection of all the available network adapters IP addresses on the local machine (multiple network cards on the same system) for PORT based transfers. You can set the adapter to use by setting the NetAdapter property to the index or IP of the network adapter from the AllAdapters collection.

NetAdapter (Variant)

Description

Returns the currently set network adapter index being used for PORT based transfers. You can set this property by the index associated to the AllAdapters collection, or by the IP address of a network adapter found in the AllAdapters collection.

URLType (Integer) (ReadOnly)

Description

Specifies the type of URL the object is connected to.

URL (String)

Description

This is the URL the object should, or is connected to.

Server (String)

Description

Specifies the server to connect to.

Port (Long)

Description

Specifies the port of the server to connect to.

Username (String)

Description

Specifies the username of the FTP site it's connecting to.

Password (String)

Description

Specifies the password of the FTP site it's connecting to.

Folder (String) (ReadOnly)

Description

Specifies the folder you are currently connected to.

ConnectionMode (Variant)

Description

The mode the FTP protocol should use when transferring files or listing directories, "PASV" or "PORT".

Timeout (Long)

Description

Specifies the amount of time to wait for the server to respond.

LastError (String) (ReadOnly)

Description

Returns the last error returned by the FTP server.

LogBytes (Long)

Description

Specifies how big the log data can get in bytes, zero for no limit.

LogData (String) (ReadOnly)

Description

Returns the FTP communication log.

Transfering (Boolean)

Description

Returns true if the object is has a second data socket open aside the protocol socket, actively listing or transferring a file.  When no listing or transfer is in progress, the return value is false.

TransferType (TransferModes)

Description

Specifies the type of connection stream to initialize when transferring data.

TransferRates(Index) (Long)

Description

Specifies the transfer rate of the object. Index 0 refers to local to local transfers. Index 1 refers to remote to local transfers (downloads). Index 2 refers to local to remote transfers (uploads).

Functions

Connect ([eURL])

Parameters

[eURL] String = ""

Specifies the URL to connect to.

Description

Connects the object to a file system.

Disconnect ()

Description

Disconnects the object from the file system.

CancelTransfer ()

Description

Cancels a file transfer.

NoOperation ()

Description

Sends the No Operation command to the server. (Ping)

RetreiveHelp () String

Description

Retrieves the servers Help data.

ChangeFolderRelative (NewFolder)

Parameters

NewFolder String

Specifies the folder to change to relative to the current folder.

Description

Changes the folder relative to the current folder.

ChangeFolderAbsolute (NewFolder)

Parameters

NewFolder String

Specifies the new folder to change to.

Description

Changes the current folder.

Rename (FromFileName, ToFileName)

Parameters

FromFileName String

Specifies the file name to rename.

 

ToFileName String

Specifies the new name of the file to rename.

Description

Renames a file.

MakeFolder (NewFolder)

Parameters

NewFolder String

Specifies the new folder to create.

Description

Creates a new folder.

RemoveFile (fileName)

Parameters

fileName String

Specifies the file name to remove.

Description

Removes a file.

RemoveFolder (FolderName)

Parameters

FolderName String

Specifies a folder to remove.

Description

Removes a folder. This function is not recursive and will likely error if the folder has contents for most servers.

ListContents ([LocalFileName]) String

Parameters

[LocalFileName] String

Specifies a file name to save the list contents to, if no file is specified then a temporary file name will be created and returned by the function.

Description

Lists the current folders files and sub folders to a local text file and returns the file path name that the listing is contained, specified by LocalFileName.

TransferFile (SourceFileName, DestinationObject, [ResumeByte], [TotalBytes])

Parameters

SourceFileName String

Specifies the file to transfer.

 

DestinationObject Client

A connected object in which to transfer the file to.

 

[ResumeByte] Long = 0

Specifies the byte position the transfer should resume at.

 [TotalBytes] Long = 0

Specifies the total number of bytes for the file, if known, this information maybe relevant in accuracy but is not required.

Description

Transfers a file from on file system to another.

ParseListing (ListData, [ListItems()]) Integer

Parameters

ListData String

Specifies the list data returned from the server to parse.

 

 

[ListItems()] Collection

Specifies the array to parse the contents into, maybe of type array or collection.  When this parameter is supplied the return value of the function is the system type, otherwise the return value is the number of items parsed.

Description

Parses out list contents from a string of text and can optionally place it in an array or collection; this function also raised the ItemListing event for every properly formed item parsed from the list data.  When no ListItems is supplied, the total number of items parsed is the return value; otherwise it will be one of the following list systems detected, lsys_Unknown, lsys_MSDos and lsys_Unix.

Automation

Object:Init (self)

Parameters

self Object

A reference to the object.

Description

Optional event that is called when the object is initialized.

Object:Term (self)

Parameters

self Object

A reference to the object.

Description

Optional event that is called when the object is terminated.

Object:Error (self, Number, Source, Description)

Parameters

self Object

A reference to the object.

 

Number Long

Returns the error number raised.

 

Source String

Returns the source of the error raised.

 

Description String

Returns the description of the error raised.

Description

Optional event fires when an error occurs from the server while FTP processing.

Object:LogMessage (self, MessageType, AddedText)

Parameters

self Object

A reference to the object.

 

MessageType MessageTypes

Specifies the type of message that was added to the log.

 

AddedText String

The text that was added to the log.

Description

Rises whenever the FTP log changes data.

Object:ItemListing (self, ItemName, ItemSize, ItemDate, ItemAccess)

Parameters

self Object

A reference to the object.

 

ItemName String

Specifies the file or folder name. Folders start with "/".

 

ItemSize String

Specifies the file or folder size.

 

ItemDate String

Specifies the file or folder date.

 

ItemAccess String

Specifies the file or folder access (Non MS-DOS).

Description

Event that occurs for every item that is successfully parsed with the PraseListing function.

Object:DataProgress (self, ProgressType, ReceivedBytes)

Parameters

self Object

A reference to the object.

 

ProgressType ProgressTypes

Specifies the type of progress this event is being called about.

ReceivedBytes Long

Specifies the total amount of bytes received for the listing transfer.

Description

Event that occurs when data is received during a listing transfer.

Object:DataComplete (self, ProgressType)

Parameters

self Object

A reference to the object.

ProgressType ProgressTypes

Specifies the type of progress this event is being called about.

Description

Event that occurs when listing of directory contents is complete.