Example #1
0
	bool CFileReceiver::getSingleFileInfo(const std::string &fileName,SFileInfo& fileInfo) const
	{
		// run through the attached proxies to find a match for the file...
		for (TProxies::const_iterator pit= _Proxies.begin(); pit!=_Proxies.end();++pit)
		{
			// if there's a match for this proxy then it'll do
			TFileInfoMap::const_iterator fit= pit->second.FileInfo.find(fileName);
			if (fit!=pit->second.FileInfo.end())
			{
				fileInfo= fit->second;
				return true;
			}
		}

		// failed to find a match so clear out the file info record and return false
		fileInfo.clear();
		return false;
	}