|
|
Retrieve an item from the server and store it in a file on the
local system.
Syntax
object.StoreItem( ItemType,
Selector, FileName, [Options] )
Remarks
The StoreItem method retrieves the specified item from
the server and stores the contents of the item in a file on the
local system. This method will cause the current thread to block
until the file transfer completes, a timeout occurs or the transfer
is canceled. During the transfer, the OnProgress event will
fire periodically, enabling the application to update any user
interface objects such as a progress bar.
- ItemType
- An integer value which identifies the type of resource being
requested. See the Select method for the complete list of
valid item types which may be specified. The item type cannot
specify a directory or index, otherwise an error will be
returned.
- Selector
- The selector string which identifies the resource on the remote
server. The item selector is considered to be an opaque string, and
does not have any meaning beyond identifying the resource on the
Gopher server.
- FileName
- A string that specifies the name of the file on the local
system that will be created. If the file already exists, it will be
overwritten.
- Options
- A numeric value which specifies one or more options. This
argument may be any one of the following values:
| Value |
Constant |
Description |
| 0 |
gopherTransferDefault |
This option specifies that the
default transfer mode should be used. If the local file exists, it
will be overwritten with the contents of the remote file. If the
Options argument is omitted, this is the transfer mode which will
be used. |
| 1 |
gopherTransferConvert |
If the resource being downloaded
from the server is textual, the data is automatically converted so
that the end of line character sequence is compatible with the
Windows platform. Individual carriage return or linefeed characters
are converted to carriage return/linefeed character sequences. |
Return Value
A value of zero is returned if the operation was successful,
otherwise a non-zero error code is returned which indicates the
cause of the failure.
See Also
GetItem Method, OnProgress Event
|
|