fs_current_dir

char *fs_current_dir(char *buf, size_t size)

Get the current working directory.

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

Parameters
  • buf[out] Buffer for storing the result path

  • size[in] Buffer size

Returns

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