tfFtpDirList

Jump to: navigation, search

Table of Contents >> Application Reference >> FTP Client API


#include <trsocket.h>


int tfFtpDirList (
ttUserFtpHandle ftpUserHandle,
char * pathNamePtr,
int directoryFlag,
ttFtpCBFuncPtr ftpUserCBFuncPtr
);


Function Description

This function retrieves a directory listing for a specified directory on remote file system. When this data is received, a user-supplied function is called.

The prototype for the callback function is:


int ftpCBFunc (
ttUserFtpHandle ftpUserHandle,
char * bufferPtr,
int bufferSize
);


Parameters

  • ftpUserHandle
    The FTP session handle.
  • pathNamePtr
    The directory to retrieve the directory listing for.
  • directoryFlag
    Indicates whether a short (TM_DIR_SHORT) or long (TM_DIR_LONG) directory listing is desired.
  • ftpUserCBFuncPtr
    A pointer to thse user's callback function to call when the directory listing is retireved.


Returns

  • TM_ENOERROR
    Success.
  • TM_WOULDBLOCK
    This FTP session is non-blocking and the call did not complete.
  • TM_EACCES
    Previous command did not complete.
  • TM_ENOTCONN
    The user is not currently connected to a FTP server.
  • TM_ENOTLOGIN
    User is not currently logged in.
  • TM_EINVAL
    Invalid FTP session pointer.
  • TM_FTP_SYNTAXCMD
    Syntax error, command unrecognized.
  • TM_FTP_SYNTAXARG
    Syntax error in parameters or arguments.
  • TM_FTP_NOCMD
    Command not implemented.
  • TM_FTP_SERVNAVAIL
    Service not available, closing FTP connection.
  • TM_FTP_FILENAVAIL
    Requested file action not taken: file unavailable.
  • TM_FTP_XFERSTART
    Data connection already open; transfer starting.
  • TM_FTP_FILEOKAY
    File status okay; about to open data communications.
  • TM_FTP_DATAOPEN
    Can't open data connection.
  • TM_FTP_XFERABOR
    Connection trouble, closed; transfer aborted.
  • TM_FTP_LOCALERR
    Requested action aborted: local error in processing.
  • TM_FTP_NOTLOGIN
    Not logged in.


Table of Contents >> Application Reference >> FTP Client API