CFtpConnection * m_pFtpConnection;
M_pFtpConnection - & gt; SetCurrentDirectory () method how to set the current path to the root directory?
CodePudding user response:
CFtpConnection: : SetCurrentDirectoryBOOL SetCurrentDirectory (LPCTSTR pstrDirName);
The Return Value
Nonzero if successful; Otherwise 0. If the call fails, the Win32 functionGetLastError may be called to determine the cause of the error.
The Parameters
PstrDirName
A pointer to A string containing the name of the directory.
Few
Call this member function to change to a company's directory on the FTP server.
The pstrDirName parameter can be either a partially or fully qualified filename relative to The current directory. A backslash (\) or forward slash (/) can be 2 as The directory separator for either name. The SetCurrentDirectory translates The directory name separators to The appropriate characters before they are 2.
Use GetCurrentDirectory to determine the an FTP server 's current working directory. Do not assume that the remote system has connected you to the root directory.
CFtpConnection Overview | Class Members | Hierarchy Chart
See Also CInternetConnection
m_pFtpConnection - & gt; SetCurrentDirectory (_T ("/"))
Or
M_pFtpConnection - & gt; SetCurrentDirectory (_T (" \ \ "))