a files-enumeratin' request for vergec!
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
geronimo

how about if vergec had some way to get a list of files in a directory? unless there's a good reason why this isn't in already, ja

i'm a fan of the callback routine way of doing it, like say

SoundsDir = "/sounds";
EnumFiles(SoundsDir, "MyCallBackGuy");

and then you have the function which will be passed the file names one by one:

void MyCallBackGuy(string filename)
{
MyCreateMenuItem(filename);
}


Ya, so that's one way you could do it ya

Posted on 2004-08-27 10:39:56

Gayo

This would be kind of nice, I have to admit. Also, a FileExists() would be useful in a lesser way.

Posted on 2004-08-27 20:31:56

Interference22

Quote:Originally posted by Gayo

This would be kind of nice, I have to admit. Also, a FileExists() would be useful in a lesser way.


*Ahem*:


// Check if a file exists. Returns 1 if it does, 0 if it doesn't
int FileExists(string fname)
{
int f;
f=FileOpen(fname, 1);
if (!f) return 0;
FileClose(f);
return 1;
}

Posted on 2004-08-27 22:47:20


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.