| | |
Methods defined here:
- __init__(self)
- Constructs an instance of FsNotifyChange. After finishing
using a instance, you should call close() on it to free the
associated resources.
- cancel(self)
- Cancels any outstanding request.
- close(self)
- Frees the resources associated with the object instance. The
object may no longer be used after this method has been
called. It is okay to call this method more than once, though.
- notify_change(self, type, callback, pathname=None)
- Asynchronously requests notification of changes either
anywhere in the filesystem, or only in locations matching the
optionally specified Unicode pathname (which may contain
wildcards).
The type parameter indicates the kind of change that should
result in notification -- its value should be one of:
ENotifyEntry=0x00 (directory addition or deletion, or change
of disk in a drive), ENotifyAll=0x01 (any change),
ENotifyFile=0x04 (file creation, rename, or deletion),
ENotifyDir=0x08 (directory creation, rename, or deletion),
ENotifyAttributes=0x10 (attribute change), ENotifyWrite=0x20
(change resulting from a write to a file), ENotifyDisk=0x40
(change resulting from a raw write to a disk).
If the registration to observe for changes fails, this method
throws an exception, and no change notification will be
delivered. Otherwise a change notification request will remain
pending until either delivered, or cancel or close is called,
in which case the request gets cancelled without notification.
Change notification is delivered by calling the callable
object provided as a parameter. It should accept a single
integer argument, which will be passed as 0 to indicate that a
filesystem change has taken place. If change observation
fails, the callback will be called with a negative argument,
which is a Symbian error code that should give some indication
of the cause of the failure. The callback is not allowed to
throw an exception; if it does, the calling thread will be
panicked.
Only one request per FsNotifyChange object may be outstanding
at any one time, and it is an error to call this method when
there is an outstanding request. Once a request completes, it
is necessary to make a new request to observe for subsequent
changes -- it is okay to call this method from within the
callback.
|