Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzFtpClient::FileDelete | (const hzString&,) |
Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp
Function Logic:
Function body:
hzEcode hzFtpClient::FileDelete (const hzString& SvrFilename) { _hzfunc("hzFtpClient::FileDelete") ; uint32_t nRecv ; uint32_t len ; uint32_t nTry ; hzEcode rc ; /* ** ** Send DELE 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 DELE command and check the response ** */ sprintf(m_c_sbuf, "DELE %s\r\n", *SvrFilename) ; len = strlen(m_c_sbuf) ; if ((rc = m_ConnControl.Send(m_c_sbuf, len)) != E_OK) { threadLog("Could not send DELE command (for file %)\n", *SvrFilename) ; continue ; } if ((rc = _ftprecv(nRecv, *_fn)) != E_OK) { threadLog("Could not recv DELE response (for file %)\n", *SvrFilename) ; continue ; } break ; } /* ** ** Check server response ** */ if (m_nRescode >&eq; 400) { threadLog("Got bad response (%d) to DELE %s\n", m_nRescode, *SvrFilename) ; return E_NODATA ; } return E_OK ; }