Copy a file from the local system to the server.
object.PutFile( LocalFile, RemoteFile,
[Options], [Offset] )
- A string that specifies the file on the local system that will
be transferred to the server. The file pathing and name conventions
must be that of the local host.
- A string that specifies the file on the server that will be
created, overwritten or appended to. The file pathing and name
conventions must be that of the server.
- A numeric bitmask which specifies one or more options. This
argument may be any one of the following values:
||This option specifies that the default transfer mode should
be used. If the remote file exists, it will be overwritten with
the contents of the local file. If the Options argument is
omitted, this is the transfer mode which will be used.
||This option specifies that if the remote file exists, the
contents of file on the local system is appended to the remote
file. If the remote file does not exist, it is created.
- A byte offset which specifies where the file transfer should
begin. The default value of zero specifies that the file transfer
should start at the beginning of the file. A value greater than
zero is typically used to restart a transfer that has not completed
successfully. Note that specifying a non-zero offset requires that
the server support the REST command to restart transfers.
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.
The PutFile method copies an existing file from the local
system to the server. 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.
GetData Method, GetFile
Method, PutData Method,