Set the working directory on the local machine
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzFtpClient::SetLocalDir | (hzString&,) |
Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp
Function Logic:
Function body:
hzEcode hzFtpClient::SetLocalDir (hzString& dir)
{
// Set the working directory on the local machine
//
// Arguments: 1) dir The taget local directory
//
// Returns: E_NOTFOUND If the local directory does not exist
// E_TYPE If the specified local directory is not a directory
// E_OK If the local directory is set
FSTAT fs ; // Local file status
if (lstat(*dir, &fs) == -1)
return E_NOTFOUND ;
if (!ISDIR(fs.st_mode))
return E_TYPE ;
m_LocalDir = dir ;
/*
** if (_hzGlobal_Debug & HZ_DEBUG_CLIENT)
** threadLog("hzFtpClient::SetLocalDir. Set local directory to %s\n", *m_LocalDir) ;
** */
return E_OK ;
}