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.
Added in version 2.9.1.
See also
See also
Class Hierarchy¶
Methods Summary¶
Returns the type of file system change that occurred. |
|
Return a description of the warning or error if this is an error event. |
|
Returns the new path of the renamed file/directory if this is a rename event. |
|
Returns the path at which the event occurred. |
|
Return the type of the warning if this event is a warning one. |
|
Returns |
|
Returns a String describing an event, useful for logging, debugging or testing. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.FileSystemWatcherEvent(Event)¶
Possible constructors:
FileSystemWatcherEvent(changeType=0, watchid=ID_ANY) -> None FileSystemWatcherEvent(changeType, warningType, errorMsg, watchid=ID_ANY) -> None FileSystemWatcherEvent(changeType, path, newPath, watchid=ID_ANY) -> None
A class of events sent when a file system event occurs.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self, changeType=0, watchid=ID_ANY)
- Parameters:
changeType (int)
watchid (int)
- Return type:
None
__init__ (self, changeType, warningType, errorMsg, watchid=ID_ANY)
- Parameters:
changeType (int)
warningType (FSWWarningType)
errorMsg (string)
watchid (int)
- Return type:
None
__init__ (self, changeType, path, newPath, watchid=ID_ANY)
- Parameters:
changeType (int)
path (string)
newPath (string)
watchid (int)
- Return type:
None
- GetChangeType(self)¶
Returns the type of file system change that occurred.
See FSWFlags for the list of possible file system change types.
- Return type:
int
- 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.
- Return type:
str
- GetNewPath(self)¶
Returns the new path of the renamed file/directory if this is a rename event.
Otherwise it returns the same path as
GetPath
.- Return type:
str
- GetPath(self)¶
Returns the path at which the event occurred.
- Return type:
str
- 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
GetChangeType
doesn’t includeFSW_EVENT_WARNING
, returnsFSW_WARNING_NONE
.- Return type:
Added in version 3.0.
- IsError(self)¶
Returns
true
if this error is an error event.Error event is an event generated when a warning or error condition arises.
- Return type:
bool
- ToString(self)¶
Returns a String describing an event, useful for logging, debugging or testing.
- Return type:
str
Properties¶
- ChangeType¶
See
GetChangeType
- ErrorDescription¶
- NewPath¶
See
GetNewPath
- WarningType¶
See
GetWarningType