In file /home/eternity/Source/Common/GMessage/H/file.h:

class File : public Debugable

Encapsulation of file I/O operations

Inheritance:

File < Debugable


Public Methods

Err File::AppendTheRestTo (File *dest, Int blockSize)
Kratky_komentar_s_teckou_na_konci
Int File::CheckError ()
Checks the error state of "file"
Err File::Close ()
Closes the file
Err File::CopyStartToPos (File *dest, Long pos, Int blockSize)
Kratky_komentar_s_teckou_na_konci
Err File::CopyTheRestTo (File *dest, Int blockSize)
Kratky_komentar_s_teckou_na_konci
Err File::CopyTo (File *dest, Size pos, Int blockSize)
Kratky_komentar_s_teckou_na_konci
Int File::Eof ()
Checks for End Of File
Int File::Exists ()
Checks if the file already exists
File::File (const Char *aName, const Char *aMode, LogFile *aLogFile)
Constructor for File
Int File::GetError ()
Returns the error code of the last file operation
Char* File::GetName ()
Return the name of this file
Size File::GetSize ()
Return the size of this file, doesn't move the file pointer
Int File::IsOpen ()
Checks if the file is open
Err File::Open ()
Tries to open a file specified by its filename in specified mode
Int File::ReadBuffer (Void *buffer, size_t number)
Reads "number" of bytes from the "file" into the "buffer"
Int File::ReadInt (Int *value)
Reads an integer from the "file" into "value"
Int File::ReadLong (Long *value)
Reads a long from the "file" into "value"
Long File::ReadLongBuffer (Void *buffer, Long size)
Read "size" of bytes from the "file" into the "buffer"
Err File::Remove ()
Removes the file
Err File::Rename (Char *newFileName)
Renames the file
Err File::Seek (Long offset, Int whence)
Moves the file pointer by calling fseek()
Err File::SeekCurrent (Long offset)
Moves the file pointer realtively to the current position
Err File::SeekEnd (Long offset)
Moves the file pointer realtively to the end of the file
Err File::SeekStart (Long offset)
Moves the file pointer realtively to the beginnig of the file
Long File::Tell ()
Returns the position of the file pionter
Int File::WriteBuffer (Void *buffer, size_t number)
Writes "number" of bytes from the "buffer" into the "file"
Int File::WriteChar (Char aChar)
Writes a char to the "file"
Int File::WriteInt (Int value)
Writes an integer to the "file"
Int File::WriteLong (Long value)
Writes a long "value" into the "file"
Long File::WriteLongBuffer (Void *buffer, Long size)
Writes "size" of bytes from the "buffer" into the "file"
Int File::WriteString (Char *aString)
Writes a string to the "file"
File::~File ()
Destructor for File

Public

methods
File (const Char *aName, const Char *aMode = FILE_DEFAULT_MODE, LogFile *aLogFile = NULL)
constructor
~File ()
destructor

file manipulation

file checking

file pointer manipulation

reading and writing

helpful file operations

Protected

attributes
methods

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Documentation

Encapsulation of file I/O operations. Description: This file contains the File class which encapsulates disk I/O operations. Changing it could enable compiling the ES servers for other file systems.
attributes

methods

methods

File(const Char *aName, const Char *aMode = FILE_DEFAULT_MODE, LogFile *aLogFile = NULL)
constructor

~File()
destructor

file manipulation

file checking

file pointer manipulation

reading and writing

helpful file operations

Err File::AppendTheRestTo(File *dest, Int blockSize)
Kratky_komentar_s_teckou_na_konci. This method assumes all files (this and "dest") open. If it's true it copies all bytes from the current position of this file to the end of "dest".
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::CheckError()
Checks the error state of "file". Returns and clears it. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::Close()
Closes the file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::CopyStartToPos(File *dest, Long pos, Int blockSize)
Kratky_komentar_s_teckou_na_konci. This method assumes all files (this and "dest") open. If it's true it copies pos bytes from the beginning of this file to "dest".
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::CopyTheRestTo(File *dest, Int blockSize)
Kratky_komentar_s_teckou_na_konci. This method assumes all files (this and "dest") open. If it's true it copies all bytes from the current position of this file to "dest".
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::CopyTo(File *dest, Size pos, Int blockSize)
Kratky_komentar_s_teckou_na_konci. This method assumes all files (this and "dest") open. If it's true it copies "size" bytes from the current position of this file to "dest".
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::Eof()
Checks for End Of File. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::Exists()
Checks if the file already exists. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

File::File(const Char *aName, const Char *aMode, LogFile *aLogFile)
Constructor for File. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::GetError()
Returns the error code of the last file operation. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Char* File::GetName()
Return the name of this file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Size File::GetSize()
Return the size of this file, doesn't move the file pointer. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::IsOpen()
Checks if the file is open. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::Open()
Tries to open a file specified by its filename in specified mode. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::ReadBuffer(Void *buffer, size_t number)
Reads "number" of bytes from the "file" into the "buffer". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::ReadInt(Int *value)
Reads an integer from the "file" into "value". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::ReadLong(Long *value)
Reads a long from the "file" into "value". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Long File::ReadLongBuffer(Void *buffer, Long size)
Read "size" of bytes from the "file" into the "buffer". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::Remove()
Removes the file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::Rename(Char *newFileName)
Renames the file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::Seek(Long offset, Int whence)
Moves the file pointer by calling fseek(). Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::SeekCurrent(Long offset)
Moves the file pointer realtively to the current position. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::SeekEnd(Long offset)
Moves the file pointer realtively to the end of the file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Err File::SeekStart(Long offset)
Moves the file pointer realtively to the beginnig of the file. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Long File::Tell()
Returns the position of the file pionter. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::WriteBuffer(Void *buffer, size_t number)
Writes "number" of bytes from the "buffer" into the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::WriteChar(Char aChar)
Writes a char to the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::WriteInt(Int value)
Writes an integer to the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::WriteLong(Long value)
Writes a long "value" into the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Long File::WriteLongBuffer(Void *buffer, Long size)
Writes "size" of bytes from the "buffer" into the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

Int File::WriteString(Char *aString)
Writes a string to the "file". Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka

File::~File()
Destructor for File. Dlouhy_komentar
Returns:
co
Parameters:
parametr -
Author:
Pavel
See Also:
co_se_toho_tyka


This class has no child classes.
Author:
Pavel
See Also:
co_se_toho_tyka

alphabetic index hierarchy of classes


generated by doc++