gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > how to check if file exists

#145575 - Programix - Sun Nov 18, 2007 11:23 am

Can i somehow check if some file exists with libFAT?

#145582 - tepples - Sun Nov 18, 2007 2:52 pm

You could try stat(). Or if you plan on reading the file anyway, you could try fopen(filename, "rb"), and if that returns a NULL pointer, the file can't be opened for reading.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#145594 - pettsu - Sun Nov 18, 2007 6:33 pm

i came across this which might help. code for a locator function is near the bottom

#145624 - Programix - Mon Nov 19, 2007 8:18 am

Thanks!