
    -_g                     L    d dl Z d dlZd dlmZ  G d de      Z G d de      Zy)    N)SoSObfuscationArchivec                   .    e Zd ZdZdZdZed        Zd Zy)DataDirArchivez{A plain directory on the filesystem that is not directly associated with
    any known or supported collection utility
    data_dirzunassociated directoryc                 @    t         j                  j                  |      S N)ospathisdirclsarc_paths     >/usr/lib/python3/dist-packages/sos/cleaner/archives/generic.pycheck_is_typezDataDirArchive.check_is_type   s    ww}}X&&    c                 T    t         j                  j                  | j                        S r   )r	   r
   abspatharchive_pathselfs    r   set_archive_rootzDataDirArchive.set_archive_root   s    ww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 Zd ZdZdZdZed        Zd Zy)TarballArchivezdA generic tar archive that is not associated with any known or supported
    collection utility
    tarballzunassociated tarballc                 L    	 t        j                  |      S # t        $ r Y yw xY w)NF)tarfile
is_tarfile	Exceptionr   s     r   r   zTarballArchive.check_is_type)   s*    	%%h// 		s    	##c                     | j                   j                  j                         r | j                   j                  j                  S y)N )tarobjfirstmemberr   namer   s    r   r   zTarballArchive.set_archive_root0   s1    ;;""((*;;**///r   Nr   r    r   r   r"   r"   !   s*     I(K r   r"   )r	   r%   sos.cleaner.archivesr   r   r"   r    r   r   <module>r.      s*    
  62* 2 * r   