#include <psemek/app/storage.hpp>
#include <psemek/io/file_stream.hpp>
#include <psemek/log/log.hpp>

namespace psemek::app
{

	std::unique_ptr<io::istream> read_storage(std::filesystem::path const & relative_path)
	{
		log::debug() << "Reading storage " << relative_path;
		return std::make_unique<io::file_istream>(app::storage_root() / relative_path);
	}

	std::unique_ptr<io::ostream> write_storage(std::filesystem::path const & relative_path)
	{
		log::debug() << "Writing storage " << relative_path;
		return std::make_unique<io::file_ostream>(app::storage_root() / relative_path);
	}

}
