73 <<
"Cannot open empty file name"
85 <<
"Could not open file " << pathname
101 <<
"No stream allocated\n"
116 <<
"No stream allocated\n"
161 <<
"file " << this->
name() <<
" does not exist"
166 return const_cast<IFstream&
>(*this);
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Input from file stream, using an ISstream.
IFstream & operator()() const
Return a non-const reference to const IFstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
virtual std::istream & stdStream()
Access to underlying std::istream.
virtual void rewind()
Rewind the stream so that it may be read again.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
The IOstreamOption is a simple container for options an IOstream can normally have.
compressionType compression() const noexcept
Get the stream compression.
@ COMPRESSED
compression = true
bool good() const noexcept
True if next operation might succeed.
bool opened() const noexcept
True if stream has been opened.
void setBad()
Set stream state to be 'bad'.
label lineNumber_
The file line.
InfoProxy< IOstream > info() const
Return info proxy.
void setClosed() noexcept
Set stream closed.
void setState(std::ios_base::iostate state) noexcept
Set stream state.
void setOpened() noexcept
Set stream opened.
Generic input stream using a standard (STL) stream.
virtual void rewind()
Rewind the stream so that it may be read again.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A class for handling file names.
A wrapped std::ifstream with possible compression handling (igzstream) that behaves much like a std::...
void reopen_gz(const std::string &pathname_gz)
Special 'rewind' method for compressed stream.
std::istream * get() noexcept
The stream pointer (ifstream or igzstream)
IOstreamOption::compressionType whichCompression() const
Which compression type?
scalar print()
Print to screen.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define InfoInFunction
Report an information message using Foam::Info.
static void check(const int retVal, const char *what)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)