added proper remove for files/dirs

This commit is contained in:
csoler 2024-03-19 23:22:46 +01:00
parent a36f7221e7
commit 2ebd7617fc
3 changed files with 40 additions and 0 deletions

View file

@ -670,4 +670,16 @@ void RsCollection::saveColl(std::vector<ColFileInfo> colFileInfos, const QString
}
#endif
bool RsCollection::removeFile(RsFileTree::FileIndex index_to_remove,RsFileTree::DirIndex parent_index)
{
mFileTree->removeFile(index_to_remove,parent_index);
}
bool RsCollection::removeDirectory(RsFileTree::DirIndex index_to_remove,RsFileTree::DirIndex parent_index)
{
mFileTree->removeDirectory(index_to_remove,parent_index);
}
void RsCollection::cleanup()
{
mFileTree = RsFileTree::fromTreeCleaned(*mFileTree);
}