Elliott Hughes | 7616005 | 2012-12-12 16:31:20 -0800 | [diff] [blame] | 1 | A simple C++ wrapper for Unix file I/O. |
| 2 | |
| 3 | This is intended to be lightweight and easy to use, similar to Java's |
| 4 | RandomAccessFile and related classes. The usual C++ idioms of RAII and "you |
| 5 | don't pay for what you don't use" apply. |
| 6 | |
| 7 | In particular, the basic RandomAccessFile interface is kept small and simple so |
| 8 | it's trivial to add new implementations. |
| 9 | |
| 10 | This code will not log, because it can't know whether that's appropriate in |
| 11 | your application. |
| 12 | |
| 13 | This code will, in general, return -errno on failure. If an operation consisted |
| 14 | of multiple sub-operations, it will return the errno corresponding to the most |
| 15 | relevant operation. |