Some checks failed
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Failing after 5m37s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
/*********************************************************************
|
|
* \file File.cpp
|
|
*
|
|
* \author Romain BOULLARD
|
|
* \date December 2025
|
|
*********************************************************************/
|
|
#include <System/File.hpp>
|
|
|
|
namespace Bigfoot
|
|
{
|
|
File::File(const eastl::string_view p_path):
|
|
m_path(p_path.data()),
|
|
m_pathString(p_path)
|
|
{
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
bool File::IsAbsolute() const
|
|
{
|
|
return m_path.is_absolute();
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
bool File::IsRelative() const
|
|
{
|
|
return m_path.is_relative();
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
bool File::Exists() const
|
|
{
|
|
return std::filesystem::exists(m_path);
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
eastl::string_view File::GetPath() const
|
|
{
|
|
return m_pathString;
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
File File::ToAbsolute() const
|
|
{
|
|
return File {std::filesystem::absolute(m_path)};
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
File File::ToRelative() const
|
|
{
|
|
return File {std::filesystem::relative(m_path)};
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
File::File(const std::filesystem::path& p_path):
|
|
m_path(p_path),
|
|
m_pathString(m_path.string().c_str())
|
|
{
|
|
}
|
|
} // namespace Bigfoot
|