def get_FILE_NOTIFY_INFORMATION_alt(event_buffer, nBytes):
    """Extract the information out of a FILE_NOTIFY_INFORMATION structure."""
    pos = 0
    event_buffer = event_buffer[:nBytes]
    while pos < len(event_buffer):
        jump, action, namelen = struct.unpack("iii", event_buffer[pos:pos + 12])
        # TODO: this may return a shortname or a longname, with no way
        # to tell which.  Normalise them somehow?
        name = event_buffer[pos + 12:pos + 12 + namelen].decode("utf-16")
        yield (name, action)
        if not jump:
            break
        pos += jump
dataset/ETHPy150Open yildizberkay/MongoApp/libs/watchdog/observers/winapi.py/get_FILE_NOTIFY_INFORMATION_alt/original