------------------------------------------------------------------------------
| 306 | |
| 307 | //------------------------------------------------------------------------------ |
| 308 | void vtkXMLPDataObjectWriter::SplitFileName() |
| 309 | { |
| 310 | // Split the FileName into its PathName, FileNameBase, and |
| 311 | // FileNameExtension components. |
| 312 | |
| 313 | std::string pathname = vtksys::SystemTools::GetFilenamePath(this->FileName); |
| 314 | // Pathname may be empty if FileName is simply a filename without any leading |
| 315 | // "/". |
| 316 | if (!pathname.empty()) |
| 317 | { |
| 318 | pathname += "/"; |
| 319 | } |
| 320 | std::string filename_wo_ext = |
| 321 | vtksys::SystemTools::GetFilenameWithoutLastExtension(this->FileName); |
| 322 | std::string ext = vtksys::SystemTools::GetFilenameLastExtension(this->FileName); |
| 323 | |
| 324 | delete[] this->PathName; |
| 325 | delete[] this->FileNameBase; |
| 326 | delete[] this->FileNameExtension; |
| 327 | |
| 328 | this->PathName = vtksys::SystemTools::DuplicateString(pathname.c_str()); |
| 329 | this->FileNameBase = vtksys::SystemTools::DuplicateString(filename_wo_ext.c_str()); |
| 330 | this->FileNameExtension = vtksys::SystemTools::DuplicateString(ext.c_str()); |
| 331 | } |
| 332 | |
| 333 | //------------------------------------------------------------------------------ |
| 334 | void vtkXMLPDataObjectWriter::ProgressCallbackFunction( |
no test coverage detected