Subversion Repositories Kolibri OS

Rev

Rev 968 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
968 leency 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);
1143 diamond 15
	~CKosFile(void);
16
	int	Read(Byte *targetPtr, int readCount);
17
	int Write(Byte *sourcePtr, int writeCount);
18
	int Seek(int seekFrom, int seekStep);
968 leency 19
protected:
20
	int filePointer;
21
	int bufferPointer;
22
	bool validBuffer;
23
	kosFileInfo fileInfo;
1143 diamond 24
	void ValidateBuffer(void);
25
	void UpdateBuffer(void);
968 leency 26
};