File manager - Edit - /opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/subsys/__pycache__/ainotify.cpython-311.opt-1.pyc
Back
� ַ9jL � �� � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z edd� � Z ej e � � Z G d� d� � Z G d� d � � ZdS ) � )� 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/defence360agent/subsys/ainotify.py�_callz Inotify._call4 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.initC s � � �}�}�^�,�,�,r* c �<