CFtpClient::GetDirectory Method  
 
INT GetDirectory(
  LPTSTR lpszDirectory,  
  INT cbDirectory  
);

The GetDirectory method copies the current working directory on the server to the specified buffer.

Parameters

lpszDirectory
Points to a buffer that will contain the name of the current working directory on the server. The file pathing and name conventions must be that of the server.
cbDirectory
The maximum number of characters that may be copied into the buffer, including the terminating null-character.

Return Value

If the method succeeds, the return value is the server result code. If the method fails, the return value is FTP_ERROR. To get extended error information, call GetLastError.

Remarks

This method sends the PWD command to the server.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftpv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

ChangeDirectory, CreateDirectory, RemoveDirectory