ftppwd()

The ftppwd() call stores the string containing the FTP server description of the current working directory on the host to the buffer.

Syntax

#include <ftpapi.h>

int ftppwd(host, userid, passwd, acct, buf, buflen)
char *host;
char *userid;
char *passwd;
char *acct,
char *buf;
crt *buflen;

Parameters

host

userid passwd acct buf buflen

Description

The ftppwd() call stores the string containing the FTP server description of the current working directory on the host to the buffer buf. The string describing the current working directory is truncated to fit buf if it is longer than buflen. The returned string is always null-terminated.

Return Values

The value 0 indicates success; the value -1 indicates an error. The value of ftperrno indicates the specific error. See Return Values for a description of the return codes.

Examples

int rc;rc=ftppwd("conypc","jason","ehgr1","dirbuf", sizeof dirbuf);

After the ftppwd() call, the buffer dirbuf contains the following:

"C:\" is current directory.

The server reply describing the current working directory on host conypc using user ID jason with password eghr1 is stored to dirbuf.


[Back: ftpputunique()]
[Next: ftpquote()]