| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzFtpClient::RemoteDirDelete | (const hzString&,) |
Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp
Function Logic:
Function body:
hzEcode hzFtpClient::RemoteDirDelete (const hzString& SvrDirname)
{
_hzfunc("hzFtpClient::RemoteDirDelete") ;
uint32_t nRecv ;
uint32_t len ;
uint32_t nTry ;
hzEcode rc ;
/*
** ** Send RMD command and receive resposns, reconnect if required.
** */
for (nTry = 0; nTry < 2; nTry++)
{
if (nTry == 1)
{
m_ConnControl.Close() ;
rc = _reconnect() ;
if (rc != E_OK)
break ;
}
/*
** ** Send the RMD command
** */
sprintf(m_c_sbuf, "RMD %s\r\n", *SvrDirname) ;
len = strlen(m_c_sbuf) ;
if ((rc = m_ConnControl.Send(m_c_sbuf, len)) != E_OK)
{
threadLog("Could not send RMD command\n") ;
continue ;
}
if ((rc = _ftprecv(nRecv, *_fn)) != E_OK)
{
threadLog("Could not recv response to RMD command\n") ;
continue ;
}
break ;
}
/*
** ** Check response code
** */
if (m_nRescode != 257)
{
threadLog("Could not delete directory\n") ;
return E_NOTFOUND ;
}
return E_OK ;
}