24 #ifndef _TPIE_FILE_ACCESSOR_POSIX_H
25 #define _TPIE_FILE_ACCESSOR_POSIX_H
29 namespace file_accessor {
42 inline ~
posix() {close_i();}
44 inline void open_ro(
const std::string & path);
45 inline void open_wo(
const std::string & path);
46 inline bool try_open_rw(
const std::string & path);
47 inline void open_rw_new(
const std::string & path);
49 inline void read_i(
void * data, memory_size_type size);
50 inline void write_i(
const void * data, memory_size_type size);
51 inline void seek_i(stream_size_type offset);
52 inline void close_i();
53 inline void truncate_i(stream_size_type bytes);
54 inline bool is_open()
const;
62 inline void set_cache_hint(
cache_hint cacheHint);
68 #include <tpie/file_accessor/posix.inl>
70 #endif //_TPIE_FILE_ACCESSOR_POSIX_H
Reads and writes stream headers, user data and blocks from TPIE streams.
static void throw_errno()
Check the global errno variable and throw an exception that matches its value.
POSIX-style file accessor.