unsigned long getfilesize(const char *filepath) {
psp_stats pstat;
sceIoGetstat(filepath,&pstat);
return pstat.filesize;
}
------
typedef struct {
unsigned long unknown[2];
unsigned long filesize;
unsigned long unknown2[24]; // guestimate
} psp_stats;
void sceIoGetstat(const char *file, psp_stats *statx);
------
Example:
fs = getfilesize("flash0:/vsh/resource/12.bmp");
The unknowns have a lot of info in them... i just dont feel like sorting it out at the moment. For the code i'm writing now, I really only want the file size.