Function fileinfo
#include <macaw.h>int fileinfo(
const char *path,
double *size,
double *modified,
int *isfolder
);
Finds out how big a file is, when it last changed and whether it's a folder.
Parameters
pathconst char *- The file or folder. A path without
/at the start is from your program's folder. sizedouble *- Where to put its size in bytes: pass the address of a
double, like&size, orNULL. modifieddouble *- Where to put when it last changed, in seconds since 1970: the address of a
double, orNULL. isfolderint *- Where to put 1 if it's a folder or 0 if not: the address of an
int, orNULL.
Returns int
1 if it's there, or 0 if it isn't (and then nothing is written).
In Folders and files, with fileexists, isfolder, makefolder, listfolder.