U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Problem with DirectoryExists() in windows
Re: Problem with DirectoryExists() in windows [message #21859 is a reply to message #21852] Mon, 08 June 2009 14:35 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Good idea. I have only added check to be sure

bool DirectoryExists(const char *name) {
#if defined(PLATFORM_WIN32)
	if(name[0] && name[1] == ':' && name[2] == '\\' && name[3] == 0 &&
	   GetDriveType(name) != DRIVE_NO_ROOT_DIR) 
	    return true;
#endif
	FindFile ff(name);
	return ff && ff.IsDirectory();
}


Mirek
 
Read Message
Read Message
Previous Topic: [SOLVED] SHA1/MD5 encrypt example
Next Topic: EOL problem
Goto Forum:
  


Current Time: Sun Oct 11 04:51:01 GMT+2 2026

Total time taken to generate the page: 0.00774 seconds