Macaw OS C reference

Function fileexists

#include <macaw.h>
int fileexists(const char *path);

Checks whether there's a file or folder at a path.

Parameters

pathconst char *
The path to check. A path without / at the start is from your program's folder.

Returns int

1 if there's a file or folder there, or 0.

In Folders and files, with isfolder, makefolder, listfolder, fileinfo.