Share via


FTP Server Data Types (Windows Embedded CE 6.0)

1/6/2010

To use data representations in FTP, you must specify the data representation type. This data type may define a byte-size for interpretation, referred to as the "logical byte size." The data type may be defined implicitly, as in ASCII, or explicitly, as in Image Type. The sample FTP server only supports the ASCII and Image types and limits the logical byte size to 8 bits.

ASCII is the FTP default data representation type and it is accepted by all FTP implementations. ASCII is used primarily for transferring text files through an FTP connection.

The server-side FTP server data is converted from an internal character representation to the standard 8-bit Network Virtual Terminal (NVT)-ASCII representation. The FTP client-side receiver will convert this data from the standard form to the appropriate form. Using the standard NVT-ASCII representation means that data must be interpreted as 8-bit bytes. The <CRLF> sequence should be used to denote the end of a line of text.

Data is sent, using TCP/IP, as contiguous bits that are packed for transfer into 8-bit transfer bytes, and the client-side receiver stores the data as contiguous bits. The structure of the storage system might necessitate padding the file, or for a record-structured file, padding each record, to some convenient boundary. The boundary might be a byte, word, or block. This padding must be all zeros and can occur only at the end of the file or at the end of each record. There must also be a way of identifying padding bits so that they may be removed if the file is retrieved.

In Unix, if you transfer a binary file in ASCII mode, it replaces carriage returns with a <CRLF>sequence. The FTP server treats both identically as an Image type.

Image type is intended for the efficient storage and retrieval of files and the transfer of binary data. This data type should be accepted by all of your FTP implementations.

See Also

Concepts

FTP Server Implementation