3 This file is part of libmspio
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
18 A class for reading and writing files.
20 Non-blocking mode is not supported on Win32.
22 class File: public Base
32 File(const std::string &, Mode=M_READ, CreateMode =CreateMode(C_CREATE+C_TRUNCATE));
41 int seek(int, SeekType);
44 Handle get_event_handle() { return handle; }
50 void check_access(Mode) const;
51 unsigned do_write(const char *, unsigned);
52 unsigned do_read(char *, unsigned);
55 inline File::CreateMode operator|(File::CreateMode m, File::CreateMode n)
56 { return File::CreateMode((int)m|(int)n); }
58 inline File::CreateMode operator&(File::CreateMode m, File::CreateMode n)
59 { return File::CreateMode((int)m&(int)n); }
61 inline File::CreateMode operator~(File::CreateMode m)
62 { return File::CreateMode(~(int)m); }