fs_absolute

char *fs_absolute(const char *path, char *buf, size_t size)

Composes an absolute path.

char buf[MAX_PATH];
if (!fs_absolute("./relative", buf, MAX_PATH))
{
    print("fs_absolute failed");
}
else
{
    printf("%s", buf);
}

Parameters
  • path[in] Some null-terminated path

  • buf[out] Buffer for storing the result path

  • size[in] Buffer size

Returns

A pointer to buf if there is no error, NULL otherwise.