.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 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.png" 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,160,217,189"/> <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="70,83,153,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="67,5,155,35"/> </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=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:`<hr class="overloadsep" /><br />`

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

      
      **__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:`<hr class="overloadsep" /><br />`

      
      **__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:`<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: `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`