.. 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 <events and event handling>`  







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>FileSystemWatcherEvent</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.FileSystemWatcherEvent_inheritance.svg" alt="Inheritance diagram of FileSystemWatcherEvent" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FileSystemWatcherEvent.html" title="A class of events sent when a file system event occurs." alt="" coords="5,159,238,188"/> <area shape="rect" id="node2" href="wx.Event.html" title="An event is a structure holding information about an event passed to a callback or member function." alt="" coords="75,82,169,111"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="72,5,171,34"/> </map> 
   </p>
   </div>

|


|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: int=0, watchid: int=ID_ANY) -> None
       
       FileSystemWatcherEvent(changeType : int, warningType : FSWWarningType,
                              errorMsg : str, watchid: int=ID_ANY) -> None
       
       FileSystemWatcherEvent(changeType : int, path : str, newPath : str,
                              watchid: int=ID_ANY) -> None
       
   
   A class of events sent when a file system event occurs.



   .. method:: __init__(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, changeType: int=0, watchid: int=ID_ANY)`
      
      
      
      
      :param `changeType`: 
      :type `changeType`: int
      :param `watchid`: 
      :type `watchid`: int
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, changeType : int, warningType : FSWWarningType, errorMsg : str, watchid: int=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:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, changeType : int, path : str, newPath : str, watchid: int=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:`<hr class="overloadsep" /><br />`






   .. 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`