mirror of
https://github.com/RocketRobz/SuperAllStarPhotoStudio.git
synced 2025-06-19 17:45:35 -04:00
17 lines
278 B
C++
17 lines
278 B
C++
#include <nds.h>
|
|
#include <stdio.h>
|
|
|
|
off_t getFileSize(const char *fileName)
|
|
{
|
|
FILE* fp = fopen(fileName, "rb");
|
|
off_t fsize = 0;
|
|
if (fp) {
|
|
fseek(fp, 0, SEEK_END);
|
|
fsize = ftell(fp); // Get source file's size
|
|
fseek(fp, 0, SEEK_SET);
|
|
}
|
|
fclose(fp);
|
|
|
|
return fsize;
|
|
}
|