fs_exist

int fs_exist(const char *path)

Checks if a path corresponds to an existing file or directory.

if (!fs_exist("./foo.txt"))
{
    print("foo.txt not found");
}
else
{
    printf("foo.txt found");
}

Parameters

path[in] Some null-terminated path

Returns

If the file or directory exists.