File tree and file changes
This commit is contained in:
@@ -29,6 +29,11 @@ CSiaApi::_CSiaFileTree::~_CSiaFileTree()
|
||||
|
||||
void CSiaApi::_CSiaFileTree::BuildTree(const json& result)
|
||||
{
|
||||
_fileList.clear();
|
||||
for (const auto& file : result["files"])
|
||||
{
|
||||
_fileList.push_back(CSiaFilePtr(new CSiaFile(_siaCurl, file)));
|
||||
}
|
||||
}
|
||||
|
||||
bool CSiaApi::_CSiaFileTree::FileExists(const String& siaPath) const
|
||||
@@ -41,6 +46,11 @@ bool CSiaApi::_CSiaFileTree::FileExists(const String& siaPath) const
|
||||
return (result != _fileList.end());
|
||||
}
|
||||
|
||||
CSiaFileCollection CSiaApi::_CSiaFileTree::GetFileList() const
|
||||
{
|
||||
return _fileList;
|
||||
}
|
||||
|
||||
CSiaFilePtr CSiaApi::_CSiaFileTree::GetFile(const String& siaPath) const
|
||||
{
|
||||
auto result = std::find_if(_fileList.begin(), _fileList.end(), [&](const CSiaFilePtr& item)->bool
|
||||
|
Reference in New Issue
Block a user