From bdd4bdd8615b1587974312a92219cbeab0068a7a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 31 Oct 2006 05:44:33 +0000 Subject: Changed the file class to be SFile so that it will collide less, all of them will be named like that, make life easier. --- src/file.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/file.cpp (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp deleted file mode 100644 index 9910b8a..0000000 --- a/src/file.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "file.h" -#include "exceptions.h" - -File::File( const char *sName, const char *sFlags ) -{ - fh = fopen( sName, sFlags ); -} - -File::~File() -{ -} - -void File::close() -{ - if( fh ) - { - fclose( fh ); - fh = NULL; - } -} - -size_t File::read( char *pBuf, size_t nBytes ) -{ - if( !fh ) - throw FileException("File not open."); - - return fread( pBuf, 1, nBytes, fh ); -} - -size_t File::write( char *pBuf, size_t nBytes ) -{ - if( !fh ) - throw FileException("File not open."); - - return fwrite( pBuf, 1, nBytes, fh ); -} - -- cgit v1.2.3