Common01/Source/Common/FileSystem/FoundStaticFile.cpp
void FoundStaticFile::AsyncLoadBest(const TLoadCallback& loadCallback)
{
   std::shared_ptr< IFileSystemProvider> pBestProvider = nullptr;
   std::filesystem::path bestPath;
   bool found = false;
   {
      std::lock_guard lock(m_bestMutex);
      pBestProvider = m_pBestProvider.lock();
      bestPath = m_bestPath;
      found = m_bestFound;
   }
   LoadStaticFile(m_pFileSystem.lock(), loadCallback, found, bestPath, pBestProvider.get());
}
//load the best file that passes filter, return false if file doesn't exist
load the best file that passes filter, return false if file doesn't exist
load the best file that passes filter return false if file doesn ' t exist
void FoundStaticFile::AsyncLoadBest(const TLoadCallback& loadCallback)
{
   std::shared_ptr< IFileSystemProvider> pBestProvider = nullptr;
   std::filesystem::path bestPath;
   bool found = false;
   {
      std::lock_guard lock(m_bestMutex);
      pBestProvider = m_pBestProvider.lock();
      bestPath = m_bestPath;
      found = m_bestFound;
   }
   LoadStaticFile(m_pFileSystem.lock(), loadCallback, found, bestPath, pBestProvider.get());
}
void FoundStaticFile :: AsyncLoadBest ( const TLoadCallback & loadCallback ) { std :: shared_ptr < IFileSystemProvider > pBestProvider = nullptr ; std :: filesystem :: path bestPath ; bool found = false ; { std :: lock_guard lock ( m_bestMutex ) ; pBestProvider = m_pBestProvider . lock ( ) ; bestPath = m_bestPath ; found = m_bestFound ; } LoadStaticFile ( m_pFileSystem . lock ( ) , loadCallback , found , bestPath , pBestProvider . get ( ) ) ; }
load the best file that passes filter, return false if file doesn't exist
load the best file that passes filter return false if file doesn ' t exist