Go to the documentation of this file.
52 Info<<
"OFstreamAllocator::OFstreamAllocator(const fileName&) : "
53 "cannot open null file " <<
endl;
57 if (compression == IOstream::COMPRESSED)
60 if (
isFile(pathname,
false))
65 ofPtr_ =
new ogzstream((pathname +
".gz").c_str());
70 if (
isFile(pathname +
".gz",
false))
77 ofPtr_ =
new ofstream(pathname.c_str(),
78 ios_base::out|ios_base::binary);
100 OSstream(*ofPtr_,
"OFstream.sinkFile_",
format, version, compression),
104 setState(ofPtr_->rdstate());
110 Info<<
"OFstream::OFstream(const fileName&,"
111 "streamFormat, versionNumber, compressionType) : "
112 "could not open file " << pathname
word format(conversionProperties.lookup("format"))
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling file names.
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
compressionType
Enumeration for the format of data in the stream.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
~OFstreamAllocator()
Destructor.
errorManip< error > abort(error &err)
bool isFile(const fileName &, const bool checkGzip=true)
Does the name exist as a FILE in the file system?
virtual ostream & stdStream()
Access to underlying std::ostream.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A std::ostream with ability to handle compressed files.
void print(Ostream &) const
Print description of IOstream to Ostream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)
OFstreamAllocator(const fileName &pathname, IOstream::compressionType compression=IOstream::UNCOMPRESSED)
Construct from pathname.
streamFormat
Enumeration for the format of data in the stream.