MCPcopy Create free account
hub / github.com/PDAL/PDAL / createFile

Function createFile

pdal/util/FileUtils.cpp:171–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169
170
171std::ostream *createFile(std::string const& name, bool asBinary)
172{
173 std::string vsi_name(name);
174 if (isStdout(name))
175 vsi_name = "/vsistdout/";
176
177 std::ios::openmode mode = std::ios::out;
178 if (asBinary)
179 mode |= std::ios::binary;
180
181 VSI::VSIOStream *ofs = new Utils::ClassicLocaleStream<VSI::VSIOStream>(vsi_name, mode);
182 if (!ofs->good())
183 {
184 delete ofs;
185 return nullptr;
186 }
187 return ofs;
188}
189
190
191std::ostream *openExisting(const std::string& name, bool asBinary)

Callers 1

openFunction · 0.70

Calls 1

isStdoutFunction · 0.85

Tested by

no test coverage detected