f8d3714816
The directories used to be always monitored recursively, even when this wasn't requested, in wxMSW implementation. Change this but also implement efficient support for monitoring the entire hierarchies using the native support for this. Also update the sample to allow monitoring directories recursively as well. See #12847. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/msw/fswatcher.h
|
|
// Purpose: wxMSWFileSystemWatcher
|
|
// Author: Bartosz Bekier
|
|
// Created: 2009-05-26
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_FSWATCHER_MSW_H_
|
|
#define _WX_FSWATCHER_MSW_H_
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_FSWATCHER
|
|
|
|
class WXDLLIMPEXP_BASE wxMSWFileSystemWatcher : public wxFileSystemWatcherBase
|
|
{
|
|
public:
|
|
wxMSWFileSystemWatcher();
|
|
|
|
wxMSWFileSystemWatcher(const wxFileName& path,
|
|
int events = wxFSW_EVENT_ALL);
|
|
|
|
// Override the base class function to provide a much more efficient
|
|
// implementation for it using the platform native support for watching the
|
|
// entire directory trees.
|
|
virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
|
|
const wxString& filter = wxEmptyString);
|
|
|
|
protected:
|
|
bool Init();
|
|
};
|
|
|
|
#endif // wxUSE_FSWATCHER
|
|
|
|
#endif /* _WX_FSWATCHER_MSW_H_ */
|