Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PosixFile Class Reference

Standard file functionality. More...

#include <PosixFile.h>

Inheritance diagram for PosixFile::

File File List of all members.

Public Types

enum  { BEG = SEEK_SET, CUR = SEEK_CUR, END = SEEK_END }

Public Methods

 PosixFile (const char *name, const char *mode)
 PosixFile ()
 ~PosixFile ()
void init ()
int open (const char *name, const char *mode)
int open (int fd, const char *mode)
int write (const void *buf, int len)
int read (void *buf, int len)
int getline (void *buf, int len)
int close ()
long tell ()
long size ()
int seek (long offset, int whence)
size_t count ()
bool eof ()
int stat (struct stat *statbuf)
int fd ()
bool operator! ()

Detailed Description

Standard file functionality.

Definition at line 12 of file PosixFile.h.


Member Enumeration Documentation

anonymous enum
 

Seek constants.

Enumeration values:
BEG 
CUR 
END 

Definition at line 21 of file PosixFile.h.


Constructor & Destructor Documentation

PosixFile::PosixFile const char *    name,
const char *    mode
 

Definition at line 4 of file PosixFile.cpp.

References open().

PosixFile::PosixFile   [inline]
 

Definition at line 24 of file PosixFile.h.

PosixFile::~PosixFile  
 

Definition at line 9 of file PosixFile.cpp.

References close().


Member Function Documentation

int PosixFile::close  
 

Definition at line 95 of file PosixFile.cpp.

References init().

Referenced by FileInputStream::~FileInputStream(), and ~PosixFile().

size_t PosixFile::count  
 

Definition at line 122 of file PosixFile.cpp.

bool PosixFile::eof  
 

Definition at line 129 of file PosixFile.cpp.

int PosixFile::fd  
 

Definition at line 144 of file PosixFile.cpp.

Referenced by open().

int PosixFile::getline void *    buf,
int    len
 

Definition at line 54 of file PosixFile.cpp.

void PosixFile::init  
 

Definition at line 16 of file PosixFile.cpp.

Referenced by close(), and open().

int PosixFile::open int    fd,
const char *    mode
 

Definition at line 35 of file PosixFile.cpp.

References fd(), and init().

int PosixFile::open const char *    name,
const char *    mode
 

Definition at line 24 of file PosixFile.cpp.

References init().

Referenced by FileInputStream::FileInputStream(), and PosixFile().

bool PosixFile::operator!  
 

Definition at line 151 of file PosixFile.cpp.

int PosixFile::read void *    buf,
int    len
 

Definition at line 77 of file PosixFile.cpp.

Referenced by FileInputStream::read().

int PosixFile::seek long    offset,
int    whence
 

Definition at line 112 of file PosixFile.cpp.

long PosixFile::size  
 

Definition at line 45 of file PosixFile.cpp.

References stat().

int PosixFile::stat struct stat *    statbuf
 

Definition at line 136 of file PosixFile.cpp.

Referenced by size().

long PosixFile::tell  
 

Definition at line 105 of file PosixFile.cpp.

int PosixFile::write const void *    buf,
int    len
 

Definition at line 86 of file PosixFile.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Oct 7 09:33:35 2002 for Gaia by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001