1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 00:15:06 +00:00
OpenMW/components/files/constrainedfilestream.hpp
2022-09-22 21:35:26 +03:00

23 lines
616 B
C++

#ifndef OPENMW_CONSTRAINEDFILESTREAM_H
#define OPENMW_CONSTRAINEDFILESTREAM_H
#include "constrainedfilestreambuf.hpp"
#include "istreamptr.hpp"
#include "streamwithbuffer.hpp"
#include <limits>
#include <string>
namespace Files
{
/// A file stream constrained to a specific region in the file, specified by the 'start' and 'length' parameters.
using ConstrainedFileStream = StreamWithBuffer<ConstrainedFileStreamBuf>;
IStreamPtr openConstrainedFileStream(const std::filesystem::path& filename, std::size_t start = 0,
std::size_t length = std::numeric_limits<std::size_t>::max());
}
#endif