diff options
Diffstat (limited to 'src/rez/rez/io.h')
| -rw-r--r-- | src/rez/rez/io.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/rez/rez/io.h b/src/rez/rez/io.h new file mode 100644 index 0000000..238a925 --- /dev/null +++ b/src/rez/rez/io.h @@ -0,0 +1,34 @@ +#ifndef REZ_IO_H +#define REZ_IO_H + +#include <cstddef> +#include <cstdint> +#include <fstream> +#include <string> + +namespace rez +{ + +class io +{ +public: + io(const char *path); + int open(); + int read(unsigned char &b); + int read(std::string &s, unsigned maxlen); + int read(void *b, size_t n); + int check(char byte); + int check(const char *s); + int read_le(uint32_t &w); + long tell(); + int seek(long offset); + const std::string &path() const; + +private: + std::ifstream f; + const std::string m_path; +}; + +} + +#endif |
