관리-도구
편집 파일: ainotify.cpython-311.pyc
� ��/��lQ�� �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl mZ edd� � Z ej e� � Z G d� d� � Z G d � d � � ZdS )u This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see <https://www.imunify360.com/legal/eula> � )� namedtupleN)�sysctl�Event)�path�flags�cookie�name�wdc � � e Zd ZdZdZdZdZdZdZdZ dZ d Zd ZdZ dZd ZdZdZdZdZdZdZdZdZdZd� ej � � dk rdnd� � Z ej ed�� � Z e j! d� � Z"e#d� � � Z$e#d� � � Z%e#d � � � Z&e#d!� � � Z'e#d"� � � Z(e#d#� � � Z)d$S )%�InotifyzE Tiny wrapper for inotify api. See `man inotify` for details � � � � � � �@ � � i � i i i @ i � i i i i i @l zlibc.{}�Darwinzso.6�dylibT)� use_errno�iIIIc � � t t j | � � |� }|dk r5t j � � }t |t j |� � � � �|S )a Wrapper to all calls to C functions. Raises OSError with appropriate errno as argument in case of error return value. :param method: method to call :param args: method args :return: called function return value in case of success ���)�getattrr �_libc�ctypes� get_errno�OSError�os�strerror)�method�args�ret�errnos �T/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/subsys/ainotify.py�_callz Inotify._callI sR � � -�g�g�m�V�,�,�d�3���"�9�9��$�&�&�E��%���U�!3�!3�4�4�4�� � c �6 � t � d� � S )z� Initialize an inotify instance. See `man inotify_init` for details :return: a file descriptor of new inotify instance �inotify_init�r r) � r* r( �initzInotify.initX s � � �}�}�^�,�,�,r* c �<