CoinFileInput

Abstract base class for file input classes.

Abstract base class for file input classes.

Inheritance

Inherits from: CoinFileIOBase

Derived classes: CoinPlainFileInput

Public Methods

haveGzipSupport

indicates whether CoinFileInput supports gzip'ed files

bool haveGzipSupport()

haveBzip2Support

indicates whether CoinFileInput supports bzip2'ed files

bool haveBzip2Support()

create

Factory method, that creates a CoinFileInput (more precisely a subclass of it) for the file specified.

CoinFileInput * create(const std::string & fileName)

Parameters:

CoinFileInput

Constructor (don't use this, use the create method instead).

 CoinFileInput(const std::string & fileName)

Parameters:

~CoinFileInput

Destructor.

 ~CoinFileInput()

read

Read a block of data from the file, similar to fread.

int read(void * buffer, int size)

Parameters:

Returns: Number of bytes read.

gets

Reads up to (size-1) characters an stores them into the buffer, similar to fgets.

char * gets(char * buffer, int size)

Parameters:

Returns: buffer on success, or 0 if no characters have been read.

fileAbsPath

Test if the given string looks like an absolute file path.

COINUTILSLIB_EXPORT bool fileAbsPath(const std::string & path)

Parameters:

fileCoinReadable

Test if the file is readable, using likely versions of the file name, and return the name that worked.

COINUTILSLIB_EXPORT bool fileCoinReadable(std::string & name, const std::string & dfltPrefix = std::string(""))

Parameters:

Source

Header: layer-0/CoinUtils/src/CoinFileIO.hpp