Example #1
0
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);
}
Example #2
0
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;
  }
}
Example #3
0
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;
}
Example #4
0
 wxDirTraverseResult OnDir(const wxString& name)
 {
     return OnFile(name);
 }