Return TypeFunction nameArguments
hzEcodehzFtpHost::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:

0:START 1:m_Host m_Username m_Password m_Source m_Repos m_Criteria 2:!host||!user||!pass||!locDir 3:!host 4:!user 5:!pass 6:!locDir 7:Return E_ARGUMENT 8:AssertDir rc 9:rc!=E_OK 10:Return hzwarn(rc,Failed to assert local dir (%s)\n,*m_Repos) 11:m_bInit 12:Return rc

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 ;
}