MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / removeFile

Method removeFile

src/utilities/bcl/BCLXML.cpp:483–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483bool BCLXML::removeFile(const openstudio::path& path) {
484 bool result = false;
485
486 const openstudio::path test = openstudio::filesystem::system_complete(path);
487
488 std::vector<BCLFileReference> newFiles;
489 for (const BCLFileReference& file : m_files) {
490 if (file.path() == test) {
491 result = true;
492 } else {
493 newFiles.push_back(file);
494 }
495 }
496
497 if (result) {
498 incrementVersionId();
499 m_files = newFiles;
500 }
501
502 return result;
503}
504
505void BCLXML::clearFiles() {
506 incrementVersionId();

Callers 2

checkForUpdatesFilesMethod · 0.80
TEST_FFunction · 0.80

Calls 2

pathMethod · 0.45
push_backMethod · 0.45

Tested by 1

TEST_FFunction · 0.64