home *** CD-ROM | disk | FTP | other *** search
- // DISKMGR.H - DiskMgr Class Header
-
- #ifndef DISKMGR_H
- #define DISKMGR_H
-
- #include <io.h>
- #include <share.h>
-
- #define IM_OK 0
- #define IM_ERROR (-1)
-
- const caReadWrite = 0;
- const caNoCache = 1;
-
-
- class DiskMgr
- {
- private:
-
- int cache; // Cache type
- void flush(int x);
-
- public:
-
- DiskMgr(int ctype = caReadWrite);
- ~DiskMgr(void);
- int open(const char *path, int access)
- {
- return sopen(path, access, SH_DENYRW);
- }
- int close(int handle);
- int read(int handle, void *buf, long start, unsigned len);
- int write(int handle, void *buf, long start, unsigned len);
- long seek(int fd, long offset);
- };
-
- #endif
-