|
Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LInetFtp::ChangeDir
#include "ltwrappr.h"
L_INT LInetFtp::ChangeDir(pszDirectory)
|
L_TCHAR *pszDirectory; |
/* name of the directory */ |
Changes the working directory on the FTP server.
|
Parameter |
Description |
|
pszDirectory |
Character string that contains the name of the directory to change to on the remote system. This can be either a fully qualified path or a name relative to the current directory. This is a NULL-terminated string. |
Returns
|
SUCCESS |
The function was successful. |
|
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Changes to a different working directory on the FTP server.
Required DLLs and Libraries
|
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
See Also
|
Functions: |
LInetFtp::CreateDir, LInetFtp::DeleteDir, LInetFtp::BrowseDir, LInetFtp::GetCurrentDir, Class Members |
|
Topics: |
|
|
|
Example
This example changes the current remote directory on a FTP server.
L_INT LInetFtp_ChangeDirExample(HWND hWndParent)
{
L_INT nRet;
LInetFtp InetFtp(TEXT("www.leadtools.com"));
// Checking if the connection failed
nRet = InetFtp.GetErrorFromList ();
if(nRet != SUCCESS)
{
InetFtp.DisplayError (hWndParent, TEXT("Can't connect to the FTP server"));
return nRet;
}
nRet = InetFtp.ChangeDir(TEXT("MyDir1"));
if(nRet != SUCCESS)
{
InetFtp.DisplayError(hWndParent, TEXT("Can't change a remote directory, an error within the server"));
return nRet;
}
return SUCCESS;
}