Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1005 barsuk 1
#pragma once
2
 
3
#define SEEK_SET			0
4
#define SEEK_CUR			1
5
 
6
#define FILE_BUFFER_SIZE	512
7
#define OS_BLOCK_SIZE		1
8
#define FILE_BUFFER_BLOCKS	(FILE_BUFFER_SIZE / OS_BLOCK_SIZE)
9
 
10
 
11
class CKosFile
12
{
13
public:
14
	CKosFile(char *fileName);
15
	virtual ~CKosFile(void);
16
	virtual int	Read(Byte *targetPtr, int readCount);
17
	virtual int Write(Byte *sourcePtr, int writeCount);
18
	virtual int Seek(int seekFrom, int seekStep);
19
protected:
20
	int filePointer;
21
	int bufferPointer;
22
	bool validBuffer;
23
	kosFileInfo fileInfo;
24
	virtual void ValidateBuffer(void);
25
	virtual void UpdateBuffer(void);
26
};