Returning which files are in a folder.
I'm writing the functions to load a custom map in my game and I need to figure out how to have my program figure out which files are in a certain folder.
I'm using C++ and writing exclusively for a windows system. I assume there are some functions in the windows API to do this but I have no idea which ones and I'm not haveing any luck at all finding information about how to do this online. Hopefully some of you out there can point me in the correct direction. Thanks in advance. (-^.^-)
Quote:Original post by bakery2k1
Win32. I suppose the more standard C++ way of doing things would be to use Boost filesystem.
dang, I should of used this.
Instead I made my own custom file management class using stat... ( and this happened not even a week ago )
Here is a hack, not very usefull thought:
system("dir >> txt.txt");
fopen(f,"txt.txt");
fread(..);
fclose()
It is highly dependable but works, hehe.. As I said
it is a hack and unrealiable.
system("dir >> txt.txt");
fopen(f,"txt.txt");
fread(..);
fclose()
It is highly dependable but works, hehe.. As I said
it is a hack and unrealiable.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement