:Allocate()
Class
Syntax
:Allocate( nBytes, [nPageSize], [hSession]) -> lSuccess
Parameters
|
|
nBytes |
Size in Bytes to reserve on the remote server. |
|
|
nPageSize |
Optional. The maximum record or page size for the file. If not provided or a value of zero is passed, it indicates that the file does not have a record or page structure, and the parameter is ignored. |
|
|
hSession |
Optional: If hSession is not passed, the value in :Session will be used |
Return
Logical indicating Success.
Returns .T. if the operation succeeds, otherwise returns .F.
To get further error information see :nErr and :cErr
To see the remote server's response, see :GetResultCode() and :GetResultString().
Description
The :Allocate() method instructs the remote server to reserve sufficient storage to accomodate the new file being transferred.
This method should be called immediately before the :OpenFile() method.
This method is ignored by those servers which do not require that the maximum size of the file be declared beforehand.
The most common FTP servers running under UNIX and Windows NT do not require that file space be preallocated.
See Also
:OpenFile(), :SetFileMode(), :SetFileStructure(), :SetFileType()