.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.FileSystemWatcherEvent: ========================================================================================================================================== |phoenix_title| **wx.FileSystemWatcherEvent** ========================================================================================================================================== A class of events sent when a file system event occurs. Types of events reported may vary depending on a platform, however all platforms report at least creation of new file/directory and access, modification, move (rename) or deletion of an existing one. .. versionadded:: 2.9.1 .. seealso:: :ref:`wx.FileSystemWatcher` .. seealso:: :ref:`Events and Event Handling ` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class FileSystemWatcherEvent:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.FileSystemWatcherEvent.__init__` :meth:`~wx.FileSystemWatcherEvent.Clone` :meth:`~wx.FileSystemWatcherEvent.GetChangeType` Returns the type of file system change that occurred. :meth:`~wx.FileSystemWatcherEvent.GetErrorDescription` Return a description of the warning or error if this is an error event. :meth:`~wx.FileSystemWatcherEvent.GetNewPath` Returns the new path of the renamed file/directory if this is a rename event. :meth:`~wx.FileSystemWatcherEvent.GetPath` Returns the path at which the event occurred. :meth:`~wx.FileSystemWatcherEvent.GetWarningType` Return the type of the warning if this event is a warning one. :meth:`~wx.FileSystemWatcherEvent.IsError` Returns ``true`` if this error is an error event. :meth:`~wx.FileSystemWatcherEvent.ToString` Returns a `String` describing an event, useful for logging, debugging or testing. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.FileSystemWatcherEvent.ChangeType` See :meth:`~wx.FileSystemWatcherEvent.GetChangeType` :attr:`~wx.FileSystemWatcherEvent.ErrorDescription` See :meth:`~wx.FileSystemWatcherEvent.GetErrorDescription` :attr:`~wx.FileSystemWatcherEvent.NewPath` See :meth:`~wx.FileSystemWatcherEvent.GetNewPath` :attr:`~wx.FileSystemWatcherEvent.Path` See :meth:`~wx.FileSystemWatcherEvent.GetPath` :attr:`~wx.FileSystemWatcherEvent.WarningType` See :meth:`~wx.FileSystemWatcherEvent.GetWarningType` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.FileSystemWatcherEvent(Event) **Possible constructors**:: FileSystemWatcherEvent(changeType=0, watchid=ID_ANY) FileSystemWatcherEvent(changeType, warningType, errorMsg, watchid=ID_ANY) FileSystemWatcherEvent(changeType, path, newPath, watchid=ID_ANY) A class of events sent when a file system event occurs. .. method:: __init__(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **__init__** `(self, changeType=0, watchid=ID_ANY)` :param `changeType`: :type `changeType`: int :param `watchid`: :type `watchid`: int :html:`

` **__init__** `(self, changeType, warningType, errorMsg, watchid=ID_ANY)` :param `changeType`: :type `changeType`: int :param `warningType`: :type `warningType`: wx.FSWWarningType :param `errorMsg`: :type `errorMsg`: string :param `watchid`: :type `watchid`: int :html:`

` **__init__** `(self, changeType, path, newPath, watchid=ID_ANY)` :param `changeType`: :type `changeType`: int :param `path`: :type `path`: string :param `newPath`: :type `newPath`: string :param `watchid`: :type `watchid`: int :html:`

` .. method:: Clone(self) :rtype: :ref:`wx.Event` .. method:: GetChangeType(self) Returns the type of file system change that occurred. See FSWFlags for the list of possible file system change types. :rtype: `int` .. method:: GetErrorDescription(self) Return a description of the warning or error if this is an error event. This string may be empty if the exact reason for the error or the warning is not known. :rtype: `string` .. method:: GetNewPath(self) Returns the new path of the renamed file/directory if this is a rename event. Otherwise it returns the same path as :meth:`GetPath` . :rtype: `string` .. method:: GetPath(self) Returns the path at which the event occurred. :rtype: `string` .. method:: GetWarningType(self) Return the type of the warning if this event is a warning one. If this is not a warning event, i.e. if :meth:`GetChangeType` doesn't include ``FSW_EVENT_WARNING``, returns ``FSW_WARNING_NONE``. :rtype: :ref:`wx.FSWWarningType` .. versionadded:: 3.0 .. method:: IsError(self) Returns ``true`` if this error is an error event. Error event is an event generated when a warning or error condition arises. :rtype: `bool` .. method:: ToString(self) Returns a `String` describing an event, useful for logging, debugging or testing. :rtype: `string` .. attribute:: ChangeType See :meth:`~wx.FileSystemWatcherEvent.GetChangeType` .. attribute:: ErrorDescription See :meth:`~wx.FileSystemWatcherEvent.GetErrorDescription` .. attribute:: NewPath See :meth:`~wx.FileSystemWatcherEvent.GetNewPath` .. attribute:: Path See :meth:`~wx.FileSystemWatcherEvent.GetPath` .. attribute:: WarningType See :meth:`~wx.FileSystemWatcherEvent.GetWarningType`