//----------------------------------------------------------------------------- // Purpose: Creates the directory, returning true if it is created, or if it already existed //----------------------------------------------------------------------------- bool BCreateDirectory( constchar *pchPath )
{ #ifdef WIN32
std::wstring wPath = UTF8to16( pchPath ); if ( ::CreateDirectoryW( wPath.c_str(), NULL ) ) returntrue;
if ( ::GetLastError() == ERROR_ALREADY_EXISTS ) returntrue;
returnfalse; #else int i = mkdir( pchPath, S_IRWXU | S_IRWXG | S_IRWXO ); if ( i == 0 ) returntrue; if ( errno == EEXIST ) returntrue;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.