summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/file.h b/src/file.h
new file mode 100644
index 0000000..bbc620c
--- /dev/null
+++ b/src/file.h
@@ -0,0 +1,36 @@
1#ifndef FILE_H
2#define FILE_H
3
4#include <stdint.h>
5
6#include "stream.h"
7
8namespace Bu
9{
10 class File : public Bu::Stream
11 {
12 public:
13 File( const char *sName, const char *sFlags );
14 virtual ~File();
15
16 virtual void close();
17 virtual size_t read( void *pBuf, size_t nBytes );
18 virtual size_t write( const void *pBuf, size_t nBytes );
19
20 virtual long tell();
21 virtual void seek( long offset );
22 virtual void setPos( long pos );
23 virtual void setPosEnd( long pos );
24 virtual bool isEOS();
25
26 virtual bool canRead();
27 virtual bool canWrite();
28 virtual bool canSeek();
29
30 private:
31 FILE *fh;
32
33 };
34}
35
36#endif