Check if the directory exists, there is no existence, create it.

xiaoxiao2021-03-06  48

/ * Shlwapi.h shlwapi.lib * /

Void CadsmngWnd :: _ CheckandCreatedIRectory (const st: string diapath)

{

Std :: string cs_tmp_dir;

INT NFIND = DIRPATH.FIND ("//", 0);

While (nfind

{

IF (nfind == -1) nfind = DIRPATH.LENGTH ();

CS_TMP_DIR = DIRPATH.SUBSTR (0, NFIND);

IF (! Pathfileexists (cs_tmp_dir.c_str ()))))

:: createDirectory (CS_TMP_DIR.c_STR (), NULL);

IF (nfind

NFIND = DIRPATH.FIND ("//", nfind;

}

}

转载请注明原文地址:https://www.9cbs.com/read-111919.html

New Post(0)