mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-24 01:23:51 +00:00
27 lines
457 B
C
27 lines
457 B
C
|
#ifndef MANGLE_STREAM_FILESERVER_H
|
||
|
#define MANGLE_STREAM_FILESERVER_H
|
||
|
|
||
|
#include "std_stream.h"
|
||
|
#include <fstream>
|
||
|
|
||
|
namespace Mangle {
|
||
|
namespace Stream {
|
||
|
|
||
|
/** Very simple file input stream, based on std::ifstream
|
||
|
*/
|
||
|
class FileStream : public StdStream
|
||
|
{
|
||
|
std::ifstream file;
|
||
|
|
||
|
public:
|
||
|
FileStream(const std::string &name)
|
||
|
: StdStream(&file)
|
||
|
{
|
||
|
file.open(name, ios::binary);
|
||
|
}
|
||
|
~FileStream() { file.close(); }
|
||
|
};
|
||
|
|
||
|
}} // namespaces
|
||
|
#endif
|