protected function fromInotifyMask($mask)
    {
        $mask &= ~IN_ISDIR;
        $event = 0;
        switch ($mask) {
            case (IN_MODIFY):
            case (IN_ATTRIB):
                $event =  FilesystemEvent::MODIFY;
                break;
            case (IN_CREATE):
                $event =  FilesystemEvent::CREATE;
                break;
            case (IN_DELETE):
            case (IN_IGNORED):
                $event =  FilesystemEvent::DELETE;
        }

        return $this->supportsEvent($event) ? $event : false;
    }