Back to product page

GetData method


Retrieves contents of remote file to string variable.

Type

None

Syntax

  • Basic
object.GetData[RemoteFile]
The GetData(object,RemoteFile) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
RemoteFileOptional. A Variant value. String expression that holds full path to file on the server.

Remarks

Unlike GetFile method that copies file from remote server to local file, GetData will get file from the server and copy it to the String variable. Once everything is completed and Done event is fired (as for all other methods), ListItem property will hold retrieved data.

Since GetData method creates temporary file on your local disk, make sure wodFtpDLX has enough privileges to create such file. Most typically, in ASP or similar environments wodFtpDLX is running as guest user, and might not have enough privileges to make this operation. In that case, it will fail with an error (Could not create temporary file).

Do not forget that RemoteFile should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something).

Platforms

Windows