[FTP]怎么设置当前FTP路径为根目录

cs516623814 2017-09-20 08:45:33
CInternetSession* m_pInetSession;
CFtpConnection* m_pFtpConnection;

m_pFtpConnection->SetCurrentDirectory()方法怎么设置当前路径为根目录?
...全文
1388 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-09-20
  • 打赏
  • 举报
回复
CFtpConnection::SetCurrentDirectory BOOL SetCurrentDirectory( LPCTSTR pstrDirName ); Return Value Nonzero if successful; otherwise 0. If the call fails, the Win32 functionGetLastError may be called to determine the cause of the error. Parameters pstrDirName A pointer to a string containing the name of the directory. Remarks Call this member function to change to a different 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 used as the directory separator for either name. SetCurrentDirectory translates the directory name separators to the appropriate characters before they are used. Use GetCurrentDirectory to determine 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->SetCurrentDirectory(_T("/"))
或
m_pFtpConnection->SetCurrentDirectory(_T("\\"))

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧