Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzFtpClient::RemoteDirCreate | (const hzString&,) |
Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp
Function Logic:
Function body:
hzEcode hzFtpClient::RemoteDirCreate (const hzString& dir) { _hzfunc("hzFtpClient::RemoteDirCreate") ; uint32_t nRecv ; uint32_t len ; uint32_t nTry ; hzEcode rc ; /* ** ** Send MKD 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 CWD command ** */ sprintf(m_c_sbuf, "MKD %s\r\n", *dir) ; len = strlen(m_c_sbuf) ; if ((rc = m_ConnControl.Send(m_c_sbuf, len)) != E_OK) { threadLog("Could not send MKD command\n") ; continue ; } if ((rc = _ftprecv(nRecv, *_fn)) != E_OK) { threadLog("Could not recv MKD response\n") ; continue ; } break ; } /* ** ** Check response code ** */ _logrescode() ; if (m_nRescode != 257) { threadLog("Expected a 257 - Got %s\n", m_c_rbuf) ; return E_WRITEFAIL ; } return E_OK ; }