home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Panoráma
/
computer_panorama_1997-12-hibas.iso
/
SHARE
/
GRAPH
/
PTC051.ZIP
/
SRC
/
FILE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-08-03
|
1KB
|
66 lines
////////////////
// File class //
////////////////
#ifndef __FILE_H
#define __FILE_H
#include "list.h"
#include <stdio.h>
class File
{
public:
// setup
File();
File(char *filename,char *mode=NULL);
~File();
// open and close
int open(char *filename,char *mode=NULL);
int close();
// packfile
int addpack(char packfile[]);
int pack(char packfile[]);
void resetpacks();
// user functions
int seek(long offset,int origin=SEEK_CUR);
int read(void *buffer,unsigned bytes);
int write(void *buffer,unsigned bytes);
int puts(char *string);
int eof();
int size();
// status
int ok() const;
protected:
// file handle
FILE *handle;
// packfile (0=no, 1=yes)
int packfile;
// registered pack files
static List<char> packfiles;
};
#endif