.. 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
Inheritance diagram for class FileSystemWatcherEvent:
`
**__init__** `(self, changeType=0, watchid=ID_ANY)`
:param `changeType`:
:type `changeType`: int
:param `watchid`:
:type `watchid`: int
:rtype: `None`
: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
:rtype: `None`
: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
:rtype: `None`
: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: `str`
.. 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: `str`
.. method:: GetPath(self)
Returns the path at which the event occurred.
:rtype: `str`
.. 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: `str`
.. 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`