28 #include <OpenFOAM/gzstream.h>
37 Foam::OFstreamAllocator::OFstreamAllocator
39 const fileName& pathname,
40 IOstream::compressionType compression
49 Info<<
"OFstreamAllocator::OFstreamAllocator(const fileName&) : "
50 "cannot open null file " <<
endl;
57 if (
isFile(pathname,
false))
62 ofPtr_ =
new ogzstream((pathname +
".gz").c_str());
67 if (
isFile(pathname +
".gz",
false))
72 ofPtr_ =
new ofstream(pathname.c_str());
77 Foam::OFstreamAllocator::~OFstreamAllocator()
105 OSstream(*ofPtr_,
"OFstream.sinkFile_", format, version, compression),
109 setState(ofPtr_->rdstate());
115 Info<<
"IFstream::IFstream(const fileName&,"
116 "streamFormat format=ASCII,"
117 "versionNumber version=currentVersion) : "
118 "could not open file for input\n"