�
i��d� � �L � d dl mZ d dlZd dlZ G d� de� Z G d� de� Zy)� )�SoSObfuscationArchiveNc �. � e Zd ZdZdZdZed� � Zd� Zy)�DataDirArchivez{A plain directory on the filesystem that is not directly associated with
any known or supported collection utility
�data_dirzunassociated directoryc �@ � t j j |� S �N)�os�path�isdir��cls�arc_paths �>/usr/lib/python3/dist-packages/sos/cleaner/archives/generic.py�
check_is_typezDataDirArchive.check_is_type s � ��w�w�}�}�X�&�&� c �T � t j j | j � S r )r r
�abspath�archive_path��selfs r �set_archive_rootzDataDirArchive.set_archive_root s � ��w�w���t�0�0�1�1r N� �__name__�
__module__�__qualname__�__doc__� type_name�description�classmethodr r � r r r r s* � �� �I�*�K��'� �'�2r r c �. � e Zd ZdZdZdZed� � Zd� Zy)�TarballArchivezdA generic tar archive that is not associated with any known or supported
collection utility
�tarballzunassociated tarballc �L � t j |� S # t $ r Y yw xY w)NF)�tarfile�
is_tarfile� Exceptionr s r r zTarballArchive.check_is_type* s* � � ��%�%�h�/�/��� �� �s � � #�#c � � | j j j � r | j j j S y)N� )�tarobj�firstmemberr �namer s r r zTarballArchive.set_archive_root1 s1 � ��;�;�"�"�(�(�*��;�;�*�*�/�/�/�r Nr r r r r" |