MCPcopy Create free account
hub / github.com/DFIR-ORC/dfir-orc / AddSamplePath

Method AddSamplePath

src/OrcLib/Configuration/ConfigFile.cpp:657–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657HRESULT ConfigFile::AddSamplePath(ConfigItem& item, const std::wstring& samplePath)
658{
659 ConfigItem sample;
660 sample = item;
661 sample.Status = ConfigItem::PRESENT;
662 sample.Type = ConfigItem::NODE;
663 item.NodeList.push_back(std::move(sample));
664
665 ConfigItem& sampleitem = item.NodeList.back();
666
667 FileFind::SearchTerm aTerm;
668
669 ConfigItem ntfs_find;
670 ntfs_find = sampleitem.SubItems[CONFIG_SAMPLE_FILEFIND];
671 ntfs_find.Type = ConfigItem::NODE;
672 ntfs_find.Status = ConfigItem::PRESENT;
673
674 ntfs_find.SubItems[CONFIG_FILEFIND_PATH].strData = samplePath;
675 ntfs_find.SubItems[CONFIG_FILEFIND_PATH].Status = ConfigItem::PRESENT;
676
677 sampleitem.SubItems[CONFIG_SAMPLE_FILEFIND].NodeList.push_back(ntfs_find);
678 sampleitem.SubItems[CONFIG_SAMPLE_FILEFIND].Status = ConfigItem::PRESENT;
679
680 item.Status = ConfigItem::PRESENT;
681 return S_OK;
682}
683
684HRESULT ConfigFile::AddSampleName(ConfigItem& item, const std::wstring& sampleName)
685{

Callers 1

WriteGetThisConfigMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected