'Dispatches events to the appropriate methods.
:param event:
The event object representing the file system event.
:type event:
:class:`FileSystemEvent`'

def dispatch(self, event):

    if (self.ignore_directories and event.is_directory):
        return
    paths = []
    if has_attribute(event, 'dest_path'):
        paths.append(unicode_paths.decode(event.dest_path))
    if event.src_path:
        paths.append(unicode_paths.decode(event.src_path))
    if any((r.match(p) for r in self.ignore_regexes for p in paths)):
        return
    if any((r.match(p) for r in self.regexes for p in paths)):
        self.on_any_event(event)
        _method_map = {EVENT_TYPE_MODIFIED: self.on_modified, EVENT_TYPE_MOVED: self.on_moved, EVENT_TYPE_CREATED: self.on_created, EVENT_TYPE_DELETED: self.on_deleted}
        event_type = event.event_type
        _method_map[event_type](event)
