| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzFtpHost::Init | (const hzString&,const hzString&,const hzString&,const hzString&,const hzString&,const hzString&,) |
Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp
Function Logic:
Function body:
hzEcode hzFtpHost::Init (const hzString& host, const hzString& user, const hzString& pass, const hzString& remDir, const hzString& locDir, const hzString& criteria)
{
_hzfunc("hzFtpSite::Initialize") ;
hzEcode rc = E_OK ;
/*
** ** Check we have an action, that the action is associated with a publication and that it has an issue date
** */
m_Host = host ;
m_Username = user ;
m_Password = pass ;
m_Source = remDir ;
m_Repos = locDir ;
m_Criteria = criteria ;
if (!host || !user || !pass || !locDir)
{
if (!host) threadLog("No FTP host supplied\n") ;
if (!user) threadLog("No FTP username supplied\n") ;
if (!pass) threadLog("No FTP password supplied\n") ;
if (!locDir) threadLog("No FTP local directory supplied\n") ;
return E_ARGUMENT ;
}
/*
** ** Formulate directory to collect files from and assert that directory
** */
rc = AssertDir(*m_Repos, 0755);
if (rc != E_OK)
return hzwarn(rc, "Failed to assert local dir (%s)\n", *m_Repos) ;
m_bInit = true ;
return rc ;
}