def __init__(self, path, f, ignore = None):

        logging.info("Using FSEvents")

        self.path = path
        self.f = f
        self.ignore = ignore

        self.observer = Observer()
        self.observer.daemon = True

        self._streams = []
        self._streams.append(createStream(self.path, path, self._update))

        self._streamed_folders = [self.path]

        def add_stream(p):
            if p in self._streamed_folders:
                return
            self._streams.append(
                createStream(p, file_path, self._update))
            self._streamed_folders.append(p)

        # Start an extra listener for all symlinks
        for file_path in fileList(self.path, folders=True):
            if os.path.islink(file_path):
                if os.path.isdir(file_path):
                    add_stream(os.path.realpath(file_path))
                else:
                    add_stream(os.path.dirname(os.path.realpath(file_path)))
dataset/ETHPy150Open koenbok/Cactus/cactus/listener/mac.py/FSEventsListener.__init__/original