Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » FindFile, get dir list
Re: FindFile, get dir list [message #18524 is a reply to message #18514] Mon, 06 October 2008 21:13 Go to previous messageGo to previous message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Thank you, Embarassed, could have known myself...
That's working now, Smile.

BTW, the names "." and ".." are still delivered, though they are being handled in "path.cpp":
bool FindFile::IsFolder() const {
	if(a)
		return IsDirectory()
			&& !(a->cFileName[0] == '.' && a->cFileName[1] == 0)
			&& !(a->cFileName[0] == '.' && a->cFileName[1] == '.' && a->cFileName[2] == 0);

with 2008.1 at WIN2K.

Maybe the filter ist better made here
bool FindFile::Next()
{
	if(!FindNextFile(handle, a)) {
		Close();
		return false;
	}
	
	while ((a->cFileName[0] == '.' && a->cFileName[1] == 0)
		|| (a->cFileName[0] == '.' && a->cFileName[1] == '.' && a->cFileName[2] == 0)
		)
		{
		Next();
		}

	return true;
}


Martin
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to subtract some days/months to a date variable?
Next Topic: Xmlize works only for storing
Goto Forum:
  


Current Time: Thu Aug 21 13:15:06 CEST 2025

Total time taken to generate the page: 0.08981 seconds