PATH:
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
imav
/
patchman
/
fs_scanner
/
__pycache__
/
Editing: utils.cpython-311.opt-1.pyc
� e��i � �� � d Z ddlZddlZddlZddlZddlmZmZ ddlm Z ej e� � Ze fde dedee fd �Zdde de defd �Zde de de fd�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> � N)�Iterator�Optional� )� MAX_FILE_SIZE� target_dir�max_size�returnc # �| K � t j | � � D ]�\ }}}|D ]�}t j � ||� � } t j � |� � |k r"t j � ||� � V � �i# t $ r&}t � d||� � Y d }~��d }~ww xY w��d S )Nz+Error occurred while processing file %s: %s)�os�walk�path�join�getsize� Exception�logger�warning)r r �root�dirs�files�filer �es �S/opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/fs_scanner/utils.py�dir_traverse_generatorr ! s� � � � � �W�Z�0�0� � ���d�E�� � �D��7�<�<��d�+�+�D� ��7�?�?�4�(�(�H�4�4��'�,�,�t�T�2�2�2�2�2���� � � ����A�4��� � � � � � � ����� ���� � � s �AB� B8�B3�3B8�/�abs_path�root_dirc � �� | r"t j � | |pd� � nd}|� t j � � � t j � � ��fd�t t �� � � � D � � S )Nr � c �^ �� g | ])}t j � �|d � � � ��*S �N)r �sepr )�.0�i� path_partss �r � <listcomp>z/all_possible_relative_paths.<locals>.<listcomp>6 s/ �� �H�H�H�A�B�F�K�K� �1�2�2��'�'�H�H�H� )r r �relpath�stripr! �split�range�len)r r �rel_pathr$ s @r �all_possible_relative_pathsr- 0 st �� � >F�M�r�w���x���S�9�9�9�2�H������'�'�-�-�b�f�5�5�J�H�H�H�H��s�:���1G�1G�H�H�H�Hr&