TmpMenu/src/file_manager/folder.cpp
Andreas Maerten 5c6fb1064b refactor!: File Manager (#1633)
* 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)
2023-07-08 17:54:59 +02:00

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;
}
}