3 #ifndef __COMMON_C_FILEIO_H
4 #define __COMMON_C_FILEIO_H
10 #include "MyWindows.h"
20 bool OpenBinary(const char *name
, int flags
);
22 CFileBase(): _handle(-1) {};
23 ~CFileBase() { Close(); }
25 bool GetLength(UInt64
&length
) const;
26 off_t
Seek(off_t distanceToMove
, int moveMethod
) const;
29 class CInFile
: public CFileBase
32 bool Open(const char *name
);
33 ssize_t
Read(void *data
, size_t size
);
36 class COutFile
: public CFileBase
39 bool Create(const char *name
, bool createAlways
);
40 ssize_t
Write(const void *data
, size_t size
);