Example #1
0
bool fileList::updatefile(file& oldFile, file& updFile)
{
    for(list<fileList::entry>::iterator it=filelst.begin();
    it!=filelst.end(); ++it)
    {
        if(it->getpath()==oldFile.getpath())
        {
            it->setpath(updFile.getpath());
            return true;
        }
    }
    return false;
}
Example #2
0
bool fileList::checkfile(file& chkFile)
{
	fileList::entry e;
	e.setpath(chkFile.getpath());
	for(list<fileList::entry>::iterator it=filelst.begin();
		it!=filelst.end(); ++it)
	{
		if(it->getpath()==chkFile.getpath())
		{
			return true;
		}
	}
	return false;
}
Example #3
0
bool fileList::addfile(file& newFile)
{
    fileList::entry e;
    e.setpath(newFile.getpath());
    filelst.push_back(e);
    return true;
}
Example #4
0
bool fileList::removefile(file& delFile)
{
    for(list<fileList::entry>::iterator it=filelst.begin();
    it!=filelst.end(); ++it)
    {
        if(it->getpath()==delFile.getpath())
        {
            filelst.erase(it);
            return true;
        }
    }
    return false;
}