diff --git a/include/bx/filepath.h b/include/bx/filepath.h index fffae92..5029d9c 100644 --- a/include/bx/filepath.h +++ b/include/bx/filepath.h @@ -46,6 +46,9 @@ namespace bx /// void set(const StringView& _str); + /// + void join(const StringView& _str); + /// const char* get() const; diff --git a/src/filepath.cpp b/src/filepath.cpp index 0771b82..da7654e 100644 --- a/src/filepath.cpp +++ b/src/filepath.cpp @@ -223,6 +223,15 @@ namespace bx ); } + void FilePath::join(const StringView& _str) + { + char tmp[kMaxFilePath]; + strCopy(tmp, BX_COUNTOF(tmp), m_filePath); + strCat(tmp, BX_COUNTOF(tmp), "/"); + strCat(tmp, BX_COUNTOF(tmp), _str); + set(tmp); + } + const char* FilePath::get() const { return m_filePath;