From 1c6ec0b7b8e437a003137428636149132d998357 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:35:40 +1100 Subject: added a path_parent function to get path of a file Now we can load .mtl files without hardcoding the full path from top-level like before. that was a hack! --- src/platform/path.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/platform/path.h (limited to 'src/platform/path.h') diff --git a/src/platform/path.h b/src/platform/path.h new file mode 100644 index 0000000..0ec6993 --- /dev/null +++ b/src/platform/path.h @@ -0,0 +1,16 @@ +/** + * @file path.h + * @brief + * @date 2024-03-11 + * @copyright Copyright (c) 2024 + */ +#pragma once + +#include "str.h" + +typedef struct path_opt { + str8 path; + bool has_value; +} path_opt; + +path_opt path_parent(const char* path); // TODO: convert to using str8 \ No newline at end of file -- cgit v1.2.3-70-g09d2