本文整理汇总了C++中CLibraryFile::CheckFileAttributes方法的典型用法代码示例。如果您正苦于以下问题:C++ CLibraryFile::CheckFileAttributes方法的具体用法?C++ CLibraryFile::CheckFileAttributes怎么用?C++ CLibraryFile::CheckFileAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLibraryFile
的用法示例。
在下文中一共展示了CLibraryFile::CheckFileAttributes方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LookupFile
CLibraryFile* CLibraryMaps::LookupFile(DWORD_PTR nIndex, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
if ( ! nIndex ) return NULL;
CLibraryFile* pFile = NULL;
CQuickLock oLock( Library.m_pSection );
return ( m_pIndexMap.Lookup( nIndex, pFile ) &&
pFile->CheckFileAttributes( SIZE_UNKNOWN, bSharedOnly, bAvailableOnly ) ) ?
pFile : NULL;
}
示例2: LookupFileByName
CLibraryFile* CLibraryMaps::LookupFileByName(LPCTSTR pszName, QWORD nSize, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
ASSERT_VALID( this );
ASSERT( pszName && *pszName );
CLibraryFile* pFile = NULL;
CString strName = PathFindFileName( pszName );
ToLower( strName );
CQuickLock oLock( Library.m_pSection );
return ( m_pNameMap.Lookup( strName, pFile ) &&
pFile->CheckFileAttributes( nSize, bSharedOnly, bAvailableOnly ) ) ?
pFile : NULL;
}
示例3: LookupFileByPath
CLibraryFile* CLibraryMaps::LookupFileByPath(LPCTSTR pszPath, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
ASSERT_VALID( this );
ASSERT( pszPath && *pszPath );
if ( ! pszPath )
return NULL; // Bad
CLibraryFile* pFile = NULL;
CString strPath( pszPath );
strPath.MakeLower();
CQuickLock oLock( Library.m_pSection );
return ( m_pPathMap.Lookup( strPath, pFile ) &&
pFile->CheckFileAttributes( SIZE_UNKNOWN, bSharedOnly, bAvailableOnly ) ) ?
pFile : NULL;
}
示例4: oLock
CLibraryFile* CLibraryMaps::LookupFileByMD5(const Hashes::Md5Hash& oMD5, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
if ( ! oMD5 ) return NULL;
CQuickLock oLock( Library.m_pSection );
CLibraryFile* pFile = m_pMD5Map[ oMD5[ 0 ] & HASH_MASK ];
for ( ; pFile ; pFile = pFile->m_pNextMD5 )
{
if ( validAndEqual( oMD5, pFile->m_oMD5 ) )
{
if ( pFile->CheckFileAttributes( SIZE_UNKNOWN, bSharedOnly, bAvailableOnly ) )
return pFile;
//return NULL;
}
}
return NULL;
}
示例5: LookupFileByBTH
CLibraryFile* CLibraryMaps::LookupFileByBTH(const Hashes::BtHash& oBTH, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
if ( ! oBTH ) return NULL;
CQuickLock oLock( Library.m_pSection );
CLibraryFile* pFile = m_pBTHMap[ oBTH[ 0 ] & HASH_MASK ];
for ( ; pFile ; pFile = pFile->m_pNextBTH )
{
if ( validAndEqual( oBTH, pFile->m_oBTH ) )
{
if ( pFile->CheckFileAttributes( SIZE_UNKNOWN, bSharedOnly, bAvailableOnly ) )
return pFile;
//return NULL;
}
}
return NULL;
}
示例6: LookupFileByTiger
CLibraryFile* CLibraryMaps::LookupFileByTiger(const Hashes::TigerHash& oTiger, BOOL bSharedOnly, BOOL bAvailableOnly) const
{
if ( ! oTiger ) return NULL;
CQuickLock oLock( Library.m_pSection );
CLibraryFile* pFile = m_pTigerMap[ oTiger[ 0 ] & HASH_MASK ];
for ( ; pFile ; pFile = pFile->m_pNextTiger )
{
if ( validAndEqual( oTiger, pFile->m_oTiger ) )
{
if ( pFile->CheckFileAttributes( SIZE_UNKNOWN, bSharedOnly, bAvailableOnly ) )
return pFile;
//return NULL;
}
}
return NULL;
}
示例7: LookupFilesByHash
CFileList* CLibraryMaps::LookupFilesByHash(const CPeerProjectFile* pFilter, BOOL bSharedOnly, BOOL bAvailableOnly, int nMaximum) const
{
CQuickLock oLock( Library.m_pSection );
CFileList* pFiles = NULL;
if ( pFilter->m_oSHA1 )
{
for ( CLibraryFile* pFile = m_pSHA1Map[ pFilter->m_oSHA1[ 0 ] & HASH_MASK ] ;
pFile ; pFile = pFile->m_pNextSHA1 )
{
if ( validAndEqual( pFile->m_oSHA1, pFilter->m_oSHA1 ) &&
*pFile == *pFilter &&
pFile->CheckFileAttributes( pFilter->m_nSize, bSharedOnly, bAvailableOnly ) )
{
if ( ! pFiles )
pFiles = new CFileList;
if ( pFiles->Find( pFile ) == NULL )
{
if ( bSharedOnly )
{
pFile->m_nHitsToday++;
pFile->m_nHitsTotal++;
}
pFiles->AddTail( pFile );
if ( nMaximum && pFiles->GetCount() >= nMaximum )
break;
}
}
}
return pFiles;
}
if ( pFilter->m_oED2K )
{
for ( CLibraryFile* pFile = m_pED2KMap[ pFilter->m_oED2K[ 0 ] & HASH_MASK ] ;
pFile ; pFile = pFile->m_pNextED2K )
{
if ( validAndEqual( pFile->m_oED2K, pFilter->m_oED2K ) &&
*pFile == *pFilter &&
pFile->CheckFileAttributes( pFilter->m_nSize, bSharedOnly, bAvailableOnly ) )
{
if ( ! pFiles )
pFiles = new CFileList;
if ( pFiles->Find( pFile ) == NULL )
{
if ( bSharedOnly )
{
pFile->m_nHitsToday++;
pFile->m_nHitsTotal++;
}
pFiles->AddTail( pFile );
if ( nMaximum && pFiles->GetCount() >= nMaximum )
return pFiles;
}
}
}
return pFiles;
}
if ( pFilter->m_oTiger )
{
for ( CLibraryFile* pFile = m_pTigerMap[ pFilter->m_oTiger[ 0 ] & HASH_MASK ] ;
pFile ; pFile = pFile->m_pNextTiger )
{
if ( validAndEqual( pFile->m_oTiger, pFilter->m_oTiger ) &&
*pFile == *pFilter &&
pFile->CheckFileAttributes( pFilter->m_nSize, bSharedOnly, bAvailableOnly ) )
{
if ( ! pFiles )
pFiles = new CFileList;
if ( pFiles->Find( pFile ) == NULL )
{
if ( bSharedOnly )
{
pFile->m_nHitsToday++;
pFile->m_nHitsTotal++;
}
pFiles->AddTail( pFile );
if ( nMaximum && pFiles->GetCount() >= nMaximum )
break;
}
}
}
return pFiles;
}
if ( pFilter->m_oBTH )
{
for ( CLibraryFile* pFile = m_pBTHMap[ pFilter->m_oBTH[ 0 ] & HASH_MASK ] ;
pFile ; pFile = pFile->m_pNextBTH )
{
if ( validAndEqual( pFile->m_oBTH, pFilter->m_oBTH ) &&
*pFile == *pFilter &&
pFile->CheckFileAttributes( pFilter->m_nSize, bSharedOnly, bAvailableOnly ) )
{
if ( ! pFiles )
//.........这里部分代码省略.........