Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ff_attrib in the struct ffblk - I don't get it!

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Hallo.
I need to read a directory & put files into one list, and directories into the other.
Unfortunately, I seem to be missing some vital peice of information, as I'm getting a spread of directories over both lists. I currently try to differentiate with the following code:
list<string> files;
list<string> directories;
ffblk ffblk
//...findfirst & findnext & while loop etc.
string str=ffblk.ff_name;
if(ffblk.ff_attrib==FA_DIREC)
directories.push_back(str);
else
files.push_back(str);

I'm using an attribute of 0 in my call to findfirst, and the directories seem to list their attributes as anything from 16-20.
Is there anyone out there who knows how to use all this?
I THOUGHT I did...

Thanks,
Douglas JL

If it don't make you laugh, it ain't true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top