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

Method GetFilesFromMetaFile

IO/IOSS/vtkIOSSFilesScanner.cxx:61–85  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

59
60//----------------------------------------------------------------------------
61std::set<std::string> vtkIOSSFilesScanner::GetFilesFromMetaFile(const std::string& filename)
62{
63 if (!vtkIOSSFilesScanner::IsMetaFile(filename))
64 {
65 return { filename };
66 }
67
68 std::set<std::string> result;
69 const auto metafile_path =
70 vtksys::SystemTools::GetFilenamePath(vtksys::SystemTools::CollapseFullPath(filename));
71 vtksys::ifstream metafile(filename.c_str());
72 while (metafile.good() && !metafile.eof())
73 {
74 std::string fname;
75 std::getline(metafile, fname);
76 rtrim(fname);
77 if (!fname.empty())
78 {
79 fname = vtksys::SystemTools::CollapseFullPath(fname, metafile_path);
80 result.insert(fname);
81 }
82 }
83
84 return result;
85}
86
87//----------------------------------------------------------------------------
88std::set<std::string> vtkIOSSFilesScanner::GetRelatedFiles(

Callers

nothing calls this directly

Calls 6

rtrimFunction · 0.70
c_strMethod · 0.45
goodMethod · 0.45
eofMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected