mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-08 18:33:37 +08:00
5c6fb1064b
* feat(vscode): added launch.json to dbg * feat(file_manager): Make use of a global instance * feat(file_manager): Allow for file and folder instances to be empty * refactor(GlobalsService): Update code of global service (untested)
24 lines
465 B
C++
24 lines
465 B
C++
#include "folder.hpp"
|
|
|
|
#include "file_manager.hpp"
|
|
|
|
namespace big
|
|
{
|
|
folder::folder(const std::filesystem::path& folder_path) :
|
|
m_folder_path(folder_path)
|
|
{
|
|
}
|
|
|
|
file folder::get_file(std::filesystem::path file_path) const
|
|
{
|
|
if (file_path.is_absolute())
|
|
throw std::exception("folder#get_file requires a relative path.");
|
|
|
|
return file(m_folder_path / file_path);
|
|
}
|
|
|
|
const std::filesystem::path folder::get_path() const
|
|
{
|
|
return m_folder_path;
|
|
}
|
|
} |