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

Method doneFile

io/BpfWriter.cpp:394–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394void BpfWriter::doneFile()
395{
396 // Rewrite the header to update the the correct number of points and
397 // statistics.
398 m_stream.seek(0);
399 try
400 {
401 m_header.write(m_stream);
402 }
403 catch (const BpfHeader::error& err)
404 {
405 throwError(err.what());
406 }
407 m_header.writeDimensions(m_stream, m_dims);
408 m_stream.close();
409 getMetadata().addList("filename", m_curFilename);
410
411 if (m_remoteFilename.size())
412 {
413 arbiter::Arbiter a;
414 a.put(m_remoteFilename, a.getBinary(filename()));
415
416 // Clean up temporary
417 FileUtils::deleteFile(filename());
418
419 // Set the remote filename back as the filename and clear.
420 setFilename(m_remoteFilename);
421 m_remoteFilename.clear();
422 }
423}
424
425} //namespace pdal

Callers

nothing calls this directly

Calls 12

deleteFileFunction · 0.85
setFilenameFunction · 0.85
writeDimensionsMethod · 0.80
getBinaryMethod · 0.80
getMetadataFunction · 0.50
seekMethod · 0.45
writeMethod · 0.45
whatMethod · 0.45
closeMethod · 0.45
sizeMethod · 0.45
putMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected