Exemple #1
0
CLoadConfig::CLoadConfig(void)
{
	char cBuf[MAX_PATH] = { NULL };
	GetCurrDir(MAX_PATH, cBuf); 
	m_strPath  = cBuf;
	m_strPath += "\\";
}
Exemple #2
0
char * ChangeToDir (const char *Dirname)
{
    STRUCT_STAT st;

    if (STAT(Dirname, &st))
    {
        // doen't exist; must create it
        MKDIR (Dirname);
    }
    if (S_ISDIR(st.st_mode) == 0) 
    {
        // it's not a dir, must create a dir
        MKDIR (Dirname);
    }
    char *oldDirname = GetCurrDir ();
    CHDIR(Dirname);
    return oldDirname;
}