filepath: Added clear and isEmpty methods.

This commit is contained in:
Branimir Karadžić
2018-01-04 13:03:41 -08:00
parent fddf8c3303
commit ae8fd89b62
2 changed files with 19 additions and 0 deletions

View File

@@ -275,6 +275,14 @@ namespace bx
return *this;
}
void FilePath::clear()
{
if (!isEmpty() )
{
set("");
}
}
void FilePath::set(Dir::Enum _dir)
{
char tmp[kMaxFilePath];
@@ -384,6 +392,11 @@ namespace bx
;
}
bool FilePath::isEmpty() const
{
return 0 == strCmp(m_filePath, ".");
}
bool make(const FilePath& _filePath, Error* _err)
{
BX_ERROR_SCOPE(_err);