MCPcopy Create free account
hub / github.com/Kitware/VTK / GetExternalBlockFileName

Function GetExternalBlockFileName

IO/HDF/vtkHDFWriter.cxx:69–81  ·  view source on GitHub ↗

* Return the filename for an external file containing , made from * the original . */

Source from the content-addressed store, hash-verified

67 * the original <filename>.
68 */
69std::string GetExternalBlockFileName(const std::string&& filename, const std::string& blockname)
70{
71 size_t lastDotPos = filename.find_last_of('.');
72 if (lastDotPos != std::string::npos)
73 {
74 // <FileStem>_<BlockName>.<extension>
75 const std::string rawName = filename.substr(0, lastDotPos);
76 const std::string extension = filename.substr(lastDotPos);
77 return rawName + "_" + blockname + extension;
78 }
79 // <FileName>_<BlockName>.vtkhdf
80 return filename + "_" + blockname + ".vtkhdf";
81}
82}
83
84//------------------------------------------------------------------------------

Callers 4

WriteDataMethod · 0.85
WriteDatasetToFileMethod · 0.85
AppendExternalBlockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected