/usr/include/sdsl/ram_filebuf.hpp is in libsdsl-dev 2.0.3-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #ifndef INCLUDED_SDSL_RAM_FSTREAMBUF
#define INCLUDED_SDSL_RAM_FSTREAMBUF
#include <fstream>
#include <vector>
#include "ram_fs.hpp"
namespace sdsl
{
class ram_filebuf : public std::streambuf
{
private:
ram_fs::content_type* m_ram_file = nullptr; // file handle
void pbump64(std::ptrdiff_t);
public:
virtual ~ram_filebuf();
ram_filebuf();
ram_filebuf(std::vector<char>& ram_file);
std::streambuf*
open(const std::string s, std::ios_base::openmode mode);
bool is_open();
ram_filebuf*
close();
pos_type
seekpos(pos_type sp,
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);
pos_type
pubseekoff(off_type off, std::ios_base::seekdir way,
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);
pos_type
pubseekpos(pos_type sp,
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);
// std::streamsize
// xsputn(const char_type* s, std::streamsize n) override;
int
sync() override;
int_type
overflow(int_type c = traits_type::eof()) override;
};
}
#endif
|