from pathlib import Path


def _event_to_dict(event):
    """
    Converts an Watchdog filesystem event to a dict.

    Parameters
    ----------
    event : watchdog.events.FileSystemEvent
        Watchdog filesystem event.

    Returns
    -------
    event_dict : dict
        Dict representation of the Watchdog filesystem event.
    """
    return {
        'event_type': event.event_type,
        'src_path': str(Path(event.src_path).relative_to(Path.cwd())),
        'is_directory': event.is_directory
    }