bool CFileSearchDlg::SearchFolder(LPCSTR Folder) { CSubFileFind sff; CFileFind *ff; BOOL Working = sff.FindFile(CString(Folder) + "\\*.*"); while (Working) { Working = sff.FindNextFile(ff); if (!OnFile(ff->GetFilePath()) || m_Cancel) return(FALSE); } return(TRUE); }
void FolderMonitor::HandleChangeNotification( const DirectoryChangeNotification& notification) const { switch (notification.type) { case DirectoryChangeNotification::kTypeDirectory: OnDirectory(notification); break; case DirectoryChangeNotification::kTypeFile: OnFile(notification); break; default: LOG(LevelDebug, L"Unknown change type\n" L"Path: " + notification.path + L"\n" L"Filename: " + notification.filename.first); break; } }
wxDirTraverseResult CDirList::OnDir(const wxString &s) { wxString sFileName; map<int,const wxString>::iterator itr; for(itr = g_mapFileSpec.begin(); itr != g_mapFileSpec.end(); ++itr) { if(itr->first & m_nFileType) { sFileName = wxDir::FindFirst(s,itr->second,wxDIR_FILES); if(!sFileName.IsEmpty()) { OnFile(sFileName); break; } } } return wxDIR_CONTINUE; }
wxDirTraverseResult OnDir(const wxString& name) { return OnFile(name); }