
    y9>i                     <    d Z ddlZddlZddlmZ d Zd ZeZd ZdS )z&Archive commands for the cpio program.    N   )utilc                    t          j        |          dddg}t          j                            d          r,|                    d          s|                    g d           |dk    r|                    d           |                    d	t          j        t          j	        
                    |                     g           ||d
dfS )zExtract a CPIO archive.z	--extractz--make-directoriesz--preserve-modification-timelinuxbsdcpio)z--no-absolute-filenamesz--force-localz--nonmatchingz"*\.\.*"   -v<T)cwdshell)r   shell_quotesysplatform
startswithendswithextendappendospathabspath)archivecompressioncmd	verbosityinteractiveoutdircmdlists          V/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/patoolib/programs/cpio.pyextract_cpior      s     	&	G |w'' 
Y0G0G 
VVV	
 	
 	
 1}}tNNC)"'//'*B*BCCDEEEVd3344    c                 t    |ddg}|dk    r|                     d           |                    d| g           |S )zList a CPIO archive.z-iz-tr   r	   z-F)r   r   )r   r   r   r   r   r   s         r   	list_cpior"   (   sD    D$G1}}tNND'?###Nr    c                    t          j        |          dg}|dk    r|                    d           t          |          dk    rUdg}|                    d |D                        |                    ddg           ||dd<   |                    d	           |                    d
t          j        |           g           |ddifS )zCreate a CPIO archive.z--creater   r	   r   findc                 6    g | ]}t          j        |          S  )r   r   ).0xs     r   
<listcomp>zcreate_cpio.<locals>.<listcomp>;   s#    ???(++???r    z-print0|z-0>r   T)r   r   r   lenr   )r   r   r   r   r   	filenamesr   findcmds           r   create_cpior/   4   s    $$j1G1}}t
9~~(??Y???@@@	3'(((!tNNC)'223444gt_%%r    )	__doc__r   r    r   r   r"   	test_cpior/   r&   r    r   <module>r3      so    - , 				 



      5 5 5$   	& & & & &r    