Returning which files are in a folder.

Started by
5 comments, last by dawidjoubert 18 years ago
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. (-^.^-)
Advertisement
FindFirstFile()
FindNextFile()
FindFirstFileEx()
FindClose()

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Are those Windows API functions, or standard C++ ones?
They're Win32.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Win32. I suppose the more standard C++ way of doing things would be to use Boost filesystem.
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.
----------------------------

http://djoubert.co.uk

This topic is closed to new replies.

Advertisement