SysFile Class Reference

#include <SysFile.hpp>

Public Types

enum  { DEFAULT_BUFFER_SIZE = 4096 , LINE_POSITIONING_BUFFER = 512 }
 
enum  { DEFAULT_BUFFER_SIZE = 4096 , LINE_POSITIONING_BUFFER = 512 }
 

Public Member Functions

 SysFile ()
 
bool open (const char *name, int openFlags, int openMode, int shareMode)
 
bool open (int handle)
 
void reset ()
 
void setStdIn ()
 
void setStdOut ()
 
void setStdErr ()
 
void setBuffering (bool buffer, size_t length)
 
bool close ()
 
bool flush ()
 
bool read (char *buf, size_t len, size_t &bytesRead)
 
bool write (const char *data, size_t len, size_t &bytesWritten)
 
bool putChar (char ch)
 
bool ungetc (char ch)
 
bool getChar (char &ch)
 
bool puts (const char *data, size_t &bytesWritten)
 
bool gets (char *buffer, size_t len, size_t &bytesRead)
 
bool setPosition (int64_t location, int64_t &position)
 
bool seek (int64_t offset, int direction, int64_t &position)
 
bool getPosition (int64_t &position)
 
bool getSize (int64_t &size)
 
bool getSize (const char *name, int64_t &size)
 
bool getTimeStamp (const char *&time)
 
bool getTimeStamp (const char *name, const char *&time)
 
bool putLine (const char *buffer, size_t len, size_t &bytesWritten)
 
bool hasData ()
 
bool countLines (int64_t &count)
 
bool countLines (int64_t start, int64_t end, int64_t &lastLine, int64_t &count)
 
bool nextLine (size_t &bytesRead)
 
bool seekForwardLines (int64_t startPosition, int64_t &lineCount, int64_t &endPosition)
 
bool isTransient ()
 
bool isDevice ()
 
bool isReadable ()
 
bool isWriteable ()
 
bool isOpen ()
 
bool isStdIn ()
 
bool error ()
 
int errorInfo ()
 
void clearErrors ()
 
bool atEof ()
 
bool hasBufferedInput ()
 
uintptr_t getHandle ()
 
 SysFile ()
 
bool open (const char *name, int openFlags, int openMode, int shareMode)
 
bool open (int handle)
 
void reset ()
 
void setStdIn ()
 
void setStdOut ()
 
void setStdErr ()
 
void setBuffering (bool buffer, size_t length)
 
bool close ()
 
bool flush ()
 
bool read (char *buf, size_t len, size_t &bytesRead)
 
bool write (const char *data, size_t len, size_t &bytesWritten)
 
bool putChar (char ch)
 
bool ungetc (char ch)
 
bool getChar (char &ch)
 
bool puts (const char *data, size_t &bytesWritten)
 
bool gets (char *buffer, size_t len, size_t &bytesRead)
 
bool setPosition (int64_t location, int64_t &position)
 
bool seek (int64_t offset, int direction, int64_t &position)
 
bool getPosition (int64_t &position)
 
bool getSize (int64_t &size)
 
bool getSize (const char *name, int64_t &size)
 
bool getTimeStamp (const char *&time)
 
bool getTimeStamp (const char *name, const char *&time)
 
bool putLine (const char *buffer, size_t len, size_t &bytesWritten)
 
bool hasData ()
 
bool countLines (int64_t &count)
 
bool countLines (int64_t start, int64_t end, int64_t &lastLine, int64_t &count)
 
bool nextLine (size_t &bytesRead)
 
bool seekForwardLines (int64_t startPosition, int64_t &lineCount, int64_t &endPosition)
 
bool isTransient ()
 
bool isDevice ()
 
bool isReadable ()
 
bool isWriteable ()
 
bool isOpen ()
 
bool error ()
 
int errorInfo ()
 
void clearErrors ()
 
bool atEof ()
 
bool hasBufferedInput ()
 
uintptr_t getHandle ()
 

Static Public Attributes

static const int stdinHandle = 0
 
static const int stdoutHandle = 1
 
static const int stderrHandle = 2
 

Protected Member Functions

void getStreamTypeInfo ()
 
void getStreamTypeInfo ()
 
int writeData (const char *data, size_t length)
 

Protected Attributes

int fileHandle
 
int errInfo
 
bool openedHandle
 
int flags
 
int mode
 
int share
 
const char * filename
 
bool buffered
 
bool transient
 
bool device
 
bool writeable
 
bool readable
 
bool isTTY
 
char * buffer
 
size_t bufferSize
 
size_t bufferPosition
 
size_t bufferedInput
 
bool writeBuffered
 
bool append
 
int64_t filePointer
 
int ungetchar
 
bool fileeof
 
char * filename
 

Detailed Description

Definition at line 72 of file unix/SysFile.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_BUFFER_SIZE 
LINE_POSITIONING_BUFFER 

Definition at line 81 of file unix/SysFile.hpp.

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_BUFFER_SIZE 
LINE_POSITIONING_BUFFER 

Definition at line 80 of file windows/SysFile.hpp.

Constructor & Destructor Documentation

◆ SysFile() [1/2]

SysFile::SysFile ( )

◆ SysFile() [2/2]

SysFile::SysFile ( )

Member Function Documentation

◆ atEof() [1/2]

bool SysFile::atEof ( )
inline

◆ atEof() [2/2]

bool SysFile::atEof ( )
inline

Definition at line 126 of file windows/SysFile.hpp.

References fileHandle, and hasBufferedInput().

◆ clearErrors() [1/2]

void SysFile::clearErrors ( )
inline

Definition at line 127 of file unix/SysFile.hpp.

References errInfo.

Referenced by StreamInfo::implicitOpen(), and StreamInfo::notreadyError().

◆ clearErrors() [2/2]

void SysFile::clearErrors ( )
inline

Definition at line 125 of file windows/SysFile.hpp.

References errInfo.

◆ close() [1/2]

bool SysFile::close ( )

Close the stream, and free all associated resources.

Returns
true if this closed successfully, false otherwise.

Definition at line 265 of file unix/SysFile.cpp.

References buffer, buffered, errInfo, fileHandle, filename, flush(), and openedHandle.

Referenced by StreamInfo::close(), MacroSpaceFile::close(), LocalMacroSpaceManager::translateRexxProgram(), and MacroSpaceFile::~MacroSpaceFile().

◆ close() [2/2]

bool SysFile::close ( )

◆ countLines() [1/4]

bool SysFile::countLines ( int64_t count)

Count the number of lines in the stream, starting from the current file pointer position.

Parameters
countThe returned line count.
Returns
The success/failure indicator.

Definition at line 692 of file unix/SysFile.cpp.

References nextLine().

Referenced by StreamInfo::countStreamLines(), StreamInfo::queryLinePosition(), and StreamInfo::setLinePositions().

◆ countLines() [2/4]

bool SysFile::countLines ( int64_t count)

◆ countLines() [3/4]

bool SysFile::countLines ( int64_t  start,
int64_t  end,
int64_t lastLine,
int64_t count 
)

Count the number of lines between two character positions.

Parameters
startThe starting offset.
endThe ending offset
lastLineThe starting offset of the last line before the end position.
countThe returned offset
Returns
The success/failure indicator

Definition at line 720 of file unix/SysFile.cpp.

References nextLine(), and seek().

◆ countLines() [4/4]

bool SysFile::countLines ( int64_t  start,
int64_t  end,
int64_t lastLine,
int64_t count 
)

◆ error() [1/2]

bool SysFile::error ( )
inline

Definition at line 125 of file unix/SysFile.hpp.

References errInfo.

Referenced by gets(), and nextLine().

◆ error() [2/2]

bool SysFile::error ( )
inline

Definition at line 123 of file windows/SysFile.hpp.

References errInfo.

◆ errorInfo() [1/2]

int SysFile::errorInfo ( )
inline

◆ errorInfo() [2/2]

int SysFile::errorInfo ( )
inline

Definition at line 124 of file windows/SysFile.hpp.

References errInfo.

◆ flush() [1/2]

bool SysFile::flush ( )

Flush the stream buffers.

Returns
True if this worked without error, false otherwise.

Definition at line 312 of file unix/SysFile.cpp.

References buffer, buffered, bufferedInput, bufferPosition, errInfo, fileHandle, filePointer, write(), and writeBuffered.

Referenced by close(), getSize(), read(), reset(), seekForwardLines(), setPosition(), StreamInfo::streamFlush(), and write().

◆ flush() [2/2]

bool SysFile::flush ( )

◆ getChar() [1/2]

bool SysFile::getChar ( char &  ch)

Definition at line 592 of file unix/SysFile.cpp.

References read().

Referenced by nextLine().

◆ getChar() [2/2]

bool SysFile::getChar ( char &  ch)

◆ getHandle() [1/2]

uintptr_t SysFile::getHandle ( )
inline

Definition at line 130 of file unix/SysFile.hpp.

References fileHandle.

Referenced by StreamInfo::queryHandle().

◆ getHandle() [2/2]

uintptr_t SysFile::getHandle ( )
inline

Definition at line 128 of file windows/SysFile.hpp.

References fileHandle.

◆ getPosition() [1/2]

◆ getPosition() [2/2]

bool SysFile::getPosition ( int64_t position)

◆ gets() [1/2]

bool SysFile::gets ( char *  buffer,
size_t  len,
size_t &  bytesRead 
)

Definition at line 636 of file unix/SysFile.cpp.

References error(), and read().

Referenced by StreamInfo::appendVariableLine(), and StreamInfo::readVariableLine().

◆ gets() [2/2]

bool SysFile::gets ( char *  buffer,
size_t  len,
size_t &  bytesRead 
)

◆ getSize() [1/4]

bool SysFile::getSize ( const char *  name,
int64_t size 
)

Retrieve the size of a file from the file name. If the name is a device, it zero is returned.

Parameters
sizeThe returned size value.
Returns
True if the size was retrievable, false otherwise.

Definition at line 1026 of file unix/SysFile.cpp.

◆ getSize() [2/4]

bool SysFile::getSize ( const char *  name,
int64_t size 
)

◆ getSize() [3/4]

bool SysFile::getSize ( int64_t size)

Retrieve the size of the stream. If the stream is open, it returns the stream size. Zero is returned if this stream is not a regular file.

Parameters
sizeThe returned size value.
Returns
True if the size was retrievable, false otherwise.

Definition at line 992 of file unix/SysFile.cpp.

References fileHandle, and flush().

Referenced by StreamInfo::getStreamSize(), hasData(), seek(), StreamInfo::size(), and LocalMacroSpaceManager::translateRexxProgram().

◆ getSize() [4/4]

bool SysFile::getSize ( int64_t size)

◆ getStreamTypeInfo() [1/2]

void SysFile::getStreamTypeInfo ( )
protected

Determine the stream characteristics after an open.

Definition at line 1104 of file unix/SysFile.cpp.

References device, fileHandle, isTTY, readable, and writeable.

Referenced by open(), setStdErr(), setStdIn(), and setStdOut().

◆ getStreamTypeInfo() [2/2]

void SysFile::getStreamTypeInfo ( )
protected

◆ getTimeStamp() [1/4]

bool SysFile::getTimeStamp ( const char *&  time)

Retrieve the size of the stream. If the stream is open, it returns the stream size. Zero is returned if this stream is not a regular file.

Parameters
sizeThe returned size value.
Returns
True if the size was retrievable, false otherwise.

Definition at line 1055 of file unix/SysFile.cpp.

References fileHandle.

Referenced by StreamInfo::getTimeStamp().

◆ getTimeStamp() [2/4]

bool SysFile::getTimeStamp ( const char *&  time)

◆ getTimeStamp() [3/4]

bool SysFile::getTimeStamp ( const char *  name,
const char *&  time 
)

Retrieve the size of a file from the file name. If the name is a device, it zero is returned.

Parameters
sizeThe returned size value.
Returns
True if the size was retrievable, false otherwise.

Definition at line 1083 of file unix/SysFile.cpp.

◆ getTimeStamp() [4/4]

bool SysFile::getTimeStamp ( const char *  name,
const char *&  time 
)

◆ hasBufferedInput() [1/2]

bool SysFile::hasBufferedInput ( )
inline

Definition at line 129 of file unix/SysFile.hpp.

References buffered, bufferedInput, and bufferPosition.

Referenced by atEof(), and hasData().

◆ hasBufferedInput() [2/2]

bool SysFile::hasBufferedInput ( )
inline

Definition at line 127 of file windows/SysFile.hpp.

References buffered, bufferedInput, and bufferPosition.

◆ hasData() [1/2]

bool SysFile::hasData ( )

Check to see if a stream still has data.

Returns
True if data can be read from the stream, false otherwise.
Remarks
TTY devices require special handling. But, if stdin is opened through a pipe, it won't be marked as a TTY, so we need to check for that also.

Check to see if a stream still has data.

Returns
True if data can be read from the stream, false otherwise.

Definition at line 1208 of file unix/SysFile.cpp.

References fileeof, fileHandle, getSize(), hasBufferedInput(), isStdIn(), isTTY, and readable.

Referenced by StreamInfo::chars(), and StreamInfo::lines().

◆ hasData() [2/2]

bool SysFile::hasData ( )

◆ isDevice() [1/2]

bool SysFile::isDevice ( )
inline

Definition at line 119 of file unix/SysFile.hpp.

References device.

Referenced by StreamInfo::streamExists(), and StreamInfo::streamOpen().

◆ isDevice() [2/2]

bool SysFile::isDevice ( )
inline

Definition at line 118 of file windows/SysFile.hpp.

References device.

◆ isOpen() [1/2]

bool SysFile::isOpen ( )
inline

Definition at line 122 of file unix/SysFile.hpp.

References fileHandle.

Referenced by StreamInfo::implicitOpen().

◆ isOpen() [2/2]

bool SysFile::isOpen ( )
inline

Definition at line 121 of file windows/SysFile.hpp.

References fileHandle.

◆ isReadable() [1/2]

bool SysFile::isReadable ( )
inline

Definition at line 120 of file unix/SysFile.hpp.

References readable.

◆ isReadable() [2/2]

bool SysFile::isReadable ( )
inline

Definition at line 119 of file windows/SysFile.hpp.

References readable.

◆ isStdIn()

bool SysFile::isStdIn ( )
inline

Definition at line 123 of file unix/SysFile.hpp.

References fileHandle, and stdinHandle.

Referenced by hasData().

◆ isTransient() [1/2]

◆ isTransient() [2/2]

bool SysFile::isTransient ( )
inline

Definition at line 117 of file windows/SysFile.hpp.

◆ isWriteable() [1/2]

bool SysFile::isWriteable ( )
inline

Definition at line 121 of file unix/SysFile.hpp.

References writeable.

◆ isWriteable() [2/2]

bool SysFile::isWriteable ( )
inline

Definition at line 120 of file windows/SysFile.hpp.

References writeable.

◆ nextLine() [1/2]

bool SysFile::nextLine ( size_t &  bytesRead)

Move to the beginning of the next line in the stream, returning a count of the bytes moved forward.

Parameters
bytesReadThe returned byte count for the line (including the terminators).
Returns
True if this was processed ok, false for any errors.

Definition at line 761 of file unix/SysFile.cpp.

References error(), and getChar().

Referenced by countLines().

◆ nextLine() [2/2]

bool SysFile::nextLine ( size_t &  bytesRead)

◆ open() [1/4]

bool SysFile::open ( const char *  name,
int  openFlags,
int  openMode,
int  shareMode 
)

Opens a file. This opens the file for both lowlevel I/O and also for higher level I/O.

Parameters
nameName of the stream.
openFlagsThe open flags. This are the same flags used on the open() function.
Returns
true if the file was opened successfully, false otherwise.
Remarks
TTY devices should not be buffered. Stdin, stdout, etc. are set correctly in their setStdIn() setStdOut(), etc., functions. But here we need to check for TTY devices and not buffer them. /dev/pts/n for example.

Opens a file. This opens the file for both lowlevel I/O and also for higher level I/O.

Parameters
nameName of the stream.
openFlagsThe open flags. This are the same flags used on the _sopen() function.
openModeOpen mode. Same flag values as _sopen().
fdopenModefdopenMode character string. Same as values use for the fdopen() function.
shareModeThe sharing mode. Same as used by the _sopen() library function.
Returns
true if the file was opened successfully, false otherwise.

Definition at line 129 of file unix/SysFile.cpp.

References append, errInfo, fileeof, fileHandle, filename, flags, getStreamTypeInfo(), isTTY, openedHandle, RX_O_APPEND, setBuffering(), and ungetchar.

Referenced by MacroSpaceFile::create(), StreamInfo::open(), MacroSpaceFile::openForLoading(), StreamInfo::setHandle(), and LocalMacroSpaceManager::translateRexxProgram().

◆ open() [2/4]

bool SysFile::open ( const char *  name,
int  openFlags,
int  openMode,
int  shareMode 
)

◆ open() [3/4]

bool SysFile::open ( int  handle)

Open a stream using a provided handle value.

Parameters
handleThe source stream handle.
fdopenModeThe fdopen() mode flags for the stream.
Returns
true if the file opened ok, false otherwise.
Remarks
TTY devices should not be buffered. Stdin, stdout, etc. are set correctly in their setStdIn() setStdOut(), etc., functions. But here we need to check for TTY devices and not buffer them. /dev/pts/n for example.

Open a stream using a provided handle value.

Parameters
handleThe source stream handle.
fdopenModeThe fdopen() mode flags for the stream.
Returns
true if the file opened ok, false otherwise.

Definition at line 188 of file unix/SysFile.cpp.

References fileHandle, getStreamTypeInfo(), isTTY, openedHandle, setBuffering(), and ungetchar.

◆ open() [4/4]

bool SysFile::open ( int  handle)

◆ putChar() [1/2]

bool SysFile::putChar ( char  ch)

Definition at line 580 of file unix/SysFile.cpp.

References write().

◆ putChar() [2/2]

bool SysFile::putChar ( char  ch)

◆ putLine() [1/2]

bool SysFile::putLine ( const char *  buffer,
size_t  len,
size_t &  bytesWritten 
)

Write a line to the stream, adding the platform specific line terminator.

Parameters
mybufferStart of the line to write.
lenThe length to write.
bytesWrittenThe actual number of bytes written, including the line terminator.
Returns
A success/failure indicator.

Write a line to the stream, adding the platform specific line terminator.

Parameters
bufferStart of the line to write.
lenThe length to write.
bytesWrittenThe actual number of bytes written, including the line terminator.
Returns
A success/failure indicator.

Definition at line 616 of file unix/SysFile.cpp.

References LINE_TERMINATOR, puts(), and write().

Referenced by StreamInfo::writeLine().

◆ putLine() [2/2]

bool SysFile::putLine ( const char *  buffer,
size_t  len,
size_t &  bytesWritten 
)

◆ puts() [1/2]

bool SysFile::puts ( const char *  data,
size_t &  bytesWritten 
)

Definition at line 599 of file unix/SysFile.cpp.

References write().

Referenced by putLine().

◆ puts() [2/2]

bool SysFile::puts ( const char *  data,
size_t &  bytesWritten 
)

◆ read() [1/2]

bool SysFile::read ( char *  buf,
size_t  len,
size_t &  bytesRead 
)

Read bytes from the stream.

Parameters
bufThe buffer to read into.
lenThe requested number of bytes to read.
bytesReadThe actual number of bytes read.
Returns
True if one or more bytes are read into buf, otherwise false.

Definition at line 346 of file unix/SysFile.cpp.

References buffer, buffered, bufferedInput, bufferPosition, bufferSize, errInfo, fileeof, fileHandle, filePointer, flush(), ungetchar, and writeBuffered.

Referenced by getChar(), gets(), StreamInfo::handleOpen(), StreamInfo::implicitOpen(), MacroSpaceFile::read(), StreamInfo::readBuffer(), StreamInfo::readLine(), LocalMacroSpaceManager::readRxstringFromFile(), seekForwardLines(), and StreamInfo::streamOpen().

◆ read() [2/2]

bool SysFile::read ( char *  buf,
size_t  len,
size_t &  bytesRead 
)

◆ reset() [1/2]

void SysFile::reset ( void  )

Reset this to an unopened state.

Definition at line 212 of file unix/SysFile.cpp.

References buffer, fileHandle, and flush().

Referenced by StreamInfo::resetFields().

◆ reset() [2/2]

void SysFile::reset ( )

◆ seek() [1/2]

bool SysFile::seek ( int64_t  offset,
int  direction,
int64_t position 
)

◆ seek() [2/2]

bool SysFile::seek ( int64_t  offset,
int  direction,
int64_t position 
)

◆ seekForwardLines() [1/2]

bool SysFile::seekForwardLines ( int64_t  startPosition,
int64_t lineCount,
int64_t endPosition 
)

◆ seekForwardLines() [2/2]

bool SysFile::seekForwardLines ( int64_t  startPosition,
int64_t lineCount,
int64_t endPosition 
)

◆ setBuffering() [1/2]

void SysFile::setBuffering ( bool  buffering,
size_t  length 
)

Controls buffering for this stream.

Parameters
bufferTrue or false depending on the desired buffering mode.

Definition at line 229 of file unix/SysFile.cpp.

References buffer, buffered, bufferedInput, bufferPosition, DEFAULT_BUFFER_SIZE, and writeBuffered.

Referenced by open(), StreamInfo::openStd(), setStdErr(), setStdIn(), setStdOut(), and StreamInfo::streamOpen().

◆ setBuffering() [2/2]

void SysFile::setBuffering ( bool  buffer,
size_t  length 
)

◆ setPosition() [1/2]

bool SysFile::setPosition ( int64_t  location,
int64_t position 
)

Definition at line 866 of file unix/SysFile.cpp.

References bufferedInput, bufferPosition, errInfo, fileHandle, filePointer, flush(), and writeBuffered.

Referenced by seek(), and seekForwardLines().

◆ setPosition() [2/2]

bool SysFile::setPosition ( int64_t  location,
int64_t position 
)

◆ setStdErr() [1/2]

void SysFile::setStdErr ( )

Set a SysFile object to the stderr stream.

Definition at line 1184 of file unix/SysFile.cpp.

References fileHandle, getStreamTypeInfo(), openedHandle, setBuffering(), stderrHandle, ungetchar, and writeable.

Referenced by StreamInfo::openStd().

◆ setStdErr() [2/2]

void SysFile::setStdErr ( )

◆ setStdIn() [1/2]

void SysFile::setStdIn ( )

Set a SysFile object to be the standard output stream.

Definition at line 1149 of file unix/SysFile.cpp.

References fileHandle, getStreamTypeInfo(), openedHandle, readable, setBuffering(), stdinHandle, and ungetchar.

Referenced by StreamInfo::openStd().

◆ setStdIn() [2/2]

void SysFile::setStdIn ( )

◆ setStdOut() [1/2]

void SysFile::setStdOut ( )

Set a SysFile object to the standard output stream.

Definition at line 1166 of file unix/SysFile.cpp.

References fileHandle, getStreamTypeInfo(), openedHandle, setBuffering(), stdoutHandle, ungetchar, and writeable.

Referenced by StreamInfo::openStd().

◆ setStdOut() [2/2]

void SysFile::setStdOut ( )

◆ ungetc() [1/2]

bool SysFile::ungetc ( char  ch)

Definition at line 586 of file unix/SysFile.cpp.

References ungetchar.

◆ ungetc() [2/2]

bool SysFile::ungetc ( char  ch)

◆ write() [1/2]

bool SysFile::write ( const char *  data,
size_t  len,
size_t &  bytesWritten 
)

write data to the stream

Parameters
dataThe data buffer to write.
lenThe length to write
bytesWrittenThe number bytes actually written (return value).
Returns
true if the write succeeded, false for any errors.

Definition at line 471 of file unix/SysFile.cpp.

References buffer, buffered, bufferedInput, bufferPosition, bufferSize, errInfo, fileHandle, filePointer, flags, flush(), and writeBuffered.

Referenced by flush(), putChar(), putLine(), puts(), MacroSpaceFile::write(), and StreamInfo::writeBuffer().

◆ write() [2/2]

bool SysFile::write ( const char *  data,
size_t  len,
size_t &  bytesWritten 
)

◆ writeData()

int SysFile::writeData ( const char *  data,
size_t  length 
)
protected

Wrapper around _write to handle block size issues with device streams.

Parameters
dataThe data to write.
lengthThe data length.
Returns
The number of bytes written

Definition at line 406 of file windows/SysFile.cpp.

References BLOCK_THRESHOLD, device, and fileHandle.

Member Data Documentation

◆ append

bool SysFile::append
protected

Definition at line 153 of file unix/SysFile.hpp.

Referenced by open(), and SysFile().

◆ buffer

char * SysFile::buffer
protected

Definition at line 148 of file unix/SysFile.hpp.

Referenced by close(), flush(), read(), reset(), setBuffering(), SysFile(), and write().

◆ buffered

bool SysFile::buffered
protected

◆ bufferedInput

size_t SysFile::bufferedInput
protected

◆ bufferPosition

size_t SysFile::bufferPosition
protected

◆ bufferSize

size_t SysFile::bufferSize
protected

Definition at line 149 of file unix/SysFile.hpp.

Referenced by read(), SysFile(), and write().

◆ device

bool SysFile::device
protected

Definition at line 144 of file unix/SysFile.hpp.

Referenced by getStreamTypeInfo(), isDevice(), SysFile(), and writeData().

◆ errInfo

int SysFile::errInfo
protected

◆ fileeof

bool SysFile::fileeof
protected

Definition at line 156 of file unix/SysFile.hpp.

Referenced by atEof(), hasData(), open(), and read().

◆ fileHandle

◆ filename [1/2]

const char* SysFile::filename
protected

Definition at line 141 of file unix/SysFile.hpp.

Referenced by close(), open(), and SysFile().

◆ filename [2/2]

char* SysFile::filename
protected

Definition at line 140 of file windows/SysFile.hpp.

◆ filePointer

int64_t SysFile::filePointer
protected

Definition at line 154 of file unix/SysFile.hpp.

Referenced by flush(), getPosition(), read(), seek(), setPosition(), SysFile(), and write().

◆ flags

int SysFile::flags
protected

Definition at line 138 of file unix/SysFile.hpp.

Referenced by open(), SysFile(), and write().

◆ isTTY

bool SysFile::isTTY
protected

Definition at line 147 of file unix/SysFile.hpp.

Referenced by getStreamTypeInfo(), hasData(), open(), and SysFile().

◆ mode

int SysFile::mode
protected

Definition at line 139 of file unix/SysFile.hpp.

Referenced by SysFile().

◆ openedHandle

bool SysFile::openedHandle
protected

Definition at line 137 of file unix/SysFile.hpp.

Referenced by close(), open(), setStdErr(), setStdIn(), setStdOut(), and SysFile().

◆ readable

bool SysFile::readable
protected

Definition at line 146 of file unix/SysFile.hpp.

Referenced by getStreamTypeInfo(), hasData(), isReadable(), setStdIn(), and SysFile().

◆ share

int SysFile::share
protected

Definition at line 140 of file unix/SysFile.hpp.

Referenced by SysFile().

◆ stderrHandle

const int SysFile::stderrHandle = 2
static

Definition at line 79 of file unix/SysFile.hpp.

Referenced by setStdErr().

◆ stdinHandle

const int SysFile::stdinHandle = 0
static

Definition at line 77 of file unix/SysFile.hpp.

Referenced by isStdIn(), and setStdIn().

◆ stdoutHandle

const int SysFile::stdoutHandle = 1
static

Definition at line 78 of file unix/SysFile.hpp.

Referenced by setStdOut().

◆ transient

bool SysFile::transient
protected

Definition at line 143 of file unix/SysFile.hpp.

◆ ungetchar

int SysFile::ungetchar
protected

Definition at line 155 of file unix/SysFile.hpp.

Referenced by open(), read(), setStdErr(), setStdIn(), setStdOut(), SysFile(), and ungetc().

◆ writeable

bool SysFile::writeable
protected

Definition at line 145 of file unix/SysFile.hpp.

Referenced by getStreamTypeInfo(), isWriteable(), setStdErr(), setStdOut(), and SysFile().

◆ writeBuffered

bool SysFile::writeBuffered
protected

Definition at line 152 of file unix/SysFile.hpp.

Referenced by flush(), getPosition(), read(), setBuffering(), setPosition(), SysFile(), and write().


The documentation for this class was generated from the following files: