2022-02-21 18:03:44 +01:00
|
|
|
#include "folder.hpp"
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "file_manager.hpp"
|
|
|
|
|
2022-02-21 18:03:44 +01:00
|
|
|
namespace big
|
|
|
|
{
|
2023-07-08 17:54:59 +02:00
|
|
|
folder::folder(const std::filesystem::path& folder_path) :
|
|
|
|
m_folder_path(folder_path)
|
2022-02-21 18:03:44 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
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.");
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
return file(m_folder_path / file_path);
|
2022-02-21 18:03:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const std::filesystem::path folder::get_path() const
|
|
|
|
{
|
|
|
|
return m_folder_path;
|
|
|
|
}
|
|
|
|
}
|