add FilenameDB::GetFileSetCopy

This commit is contained in:
Glenn Maynard
2005-01-27 02:00:55 +00:00
parent a98aacf322
commit ec19545327
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -531,6 +531,16 @@ void FilenameDB::GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDi
}
}
/* Get a complete copy of a FileSet. This isn't very efficient, since it's a deep
* copy, but allows retrieving a copy from elsewhere without having to worry about
* our locking semantics. */
void FilenameDB::GetFileSetCopy( CString sDir, FileSet &out )
{
FileSet *pFileSet = GetFileSet( sDir );
out = *pFileSet;
m_Mutex.Unlock(); /* locked by GetFileSet */
}
/*
* Copyright (c) 2003-2004 Glenn Maynard
* All rights reserved.
+2
View File
@@ -123,6 +123,8 @@ public:
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
void FlushDirCache();
void GetFileSetCopy( CString dir, FileSet &out );
};
/* This FilenameDB must be populated in advance. */