libtextworker 0.1.4
Cross-platform, free and open library for Python projects
Public Member Functions | Static Public Attributes | List of all members
libtextworker.interface.wx.dirctrl.FSEventHandler Class Reference
Inheritance diagram for libtextworker.interface.wx.dirctrl.FSEventHandler:
Inheritance graph
[legend]

Public Member Functions

def evtIsDir (this, FileSystemEvent event)
 
def getTarget (this)
 
def on_moved (this, FileSystemEvent event)
 
def on_created (this, FileSystemEvent event)
 
def on_deleted (this, FileSystemEvent event)
 
def on_modified (this, FileSystemEvent event)
 
def on_closed (this, FileSystemEvent event)
 
def on_opened (this, FileSystemEvent event)
 

Static Public Attributes

 bool
 

Detailed Description

A file system event handler derived from watchdog's FileSystemEventHandler.

On both wx and Tk, a new event will be generated.
Set the Target attribute which the handler sends the event to.

Or, if you use this for your own widget, derive this class like any other classes
you use for that widget, and set TargetIsSelf = True instead of Target.
This class does not use __init__.

Currently only one target is supported.

Example usage:
```python
    from watchdog.observers import Observer
    (...)

    def on_close(evt): # On window close
        observer.stop()
        observer.join()
        evt.Skip()

    def func(evt):
        # Do anything with evt.path!

    wind = wx.(...) # A wxWindow
    wind.Bind("put your wanted event here", func)
    path = os.path.expanduser('~/')
    evt_handler = FSEventHandler()
    evt_handler.Target = wind
    observer = Observer()
    observer.schedule(evt_handler, path, recursive=True)
    observer.start()
```

Definition at line 55 of file dirctrl.py.


The documentation for this class was generated from the following file: