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

Method CanReadFile

IO/Fides/vtkFidesReader.cxx:120–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120int vtkFidesReader::CanReadFile(const std::string& name)
121{
122 if (!vtksys::SystemTools::FileExists(name))
123 {
124 return 0;
125 }
126 if (vtksys::SystemTools::StringEndsWith(name, ".bp") ||
127 vtksys::SystemTools::StringEndsWith(name, ".bp4") ||
128 vtksys::SystemTools::StringEndsWith(name, ".bp5"))
129 {
130 if (fides::io::DataSetReader::CheckForDataModelAttribute(name))
131 {
132 return 1;
133 }
134 return 0;
135 }
136 if (vtksys::SystemTools::StringEndsWith(name, ".json"))
137 {
138 return 1;
139 }
140 return 0;
141}
142
143void vtkFidesReader::SetFileName(const std::string& fname)
144{

Callers

nothing calls this directly

Calls 1

StringEndsWithFunction · 0.85

Tested by

no test coverage detected