:SetFileType()


Class

     aprFTP()

 

Syntax

     :SetFileType(nType, [hSession] ) -> lSuccess

 

Parameters

 

nType

Numeric. Specifies the default type of file being opened or created on the remote server.

For possible values, see table below.

 

hSession

Optional: If hSession is not passed, the value in :Session will be used

 

The nType parameter can be one of the following values.

Value

Description

FILE_TYPE_ASCII

The file is a text file using the ASCII character set. For those servers which mark the end of a line with characters other than a carriage return and linefeed, it will be converted to the native client format. This is the file type used for directory listings.

FILE_TYPE_EBCDIC

The file is a text file using the EBCDIC character set. Local files will be converted to EBCDIC when sent to the server. Remote files will be converted to the native ASCII character set when retrieved from the server.

FILE_TYPE_IMAGE

The file is a binary image and no data conversion of any type is performed on the file. This is typically the default file type for data file transfers.

 

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 :SetFileType() method sets the default file type for the current client session, which indicates what type of file is being opened or created on the remote server.

 

The file type should be set before a file is opened or created on the remote server. Once the file type is set, it is in effect for all files that are subsequently opened or created.

 

See Also

:OpenFile(), :SetFileMode(), :SetFileStructure(), :SetPassiveMode()