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.
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.