
    i                        S SK Jr  S SKrS SKrS SKrS SKrS SKr " S S\5      rSS jr	SR                  \" S5       V s/ s H2  n \" \" \" U 5      5      5      S:H  =(       a    \" U 5      =(       d    S	PM4     sn 5      rSS
 jr\R"                  4S jr\S:X  a#  \R(                  " \" \R"                  5      5        ggs  sn f )    )print_functionNc                       \ rS rSrSrSrg)NullsInString$   zNulls in string. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       7/app/mltbenv/lib/python3.13/site-packages/xattr/tool.pyr   r   $   s    r   r   c                 V   U (       a  [        U 5        [        S5        [        R                  R                  [        R
                  S   5      n[        SU< S35        [        SU< S35        [        SU< S35        [        SU< S35        [        SU< S	35        [        S5        [        S
5        [        S5        [        S5        [        S5        [        S5        [        S5        [        S5        [        S5        [        S5        [        S5        [        S5        U (       a  gg)N r   zusage: z [-slz] file [file ...]z       z$ -p [-slz] attr_name file [file ...]z. -w [-sz] attr_name attr_value file [file ...]z" -d [-s] attr_name file [file ...]z -c [-s] file [file ...]zBThe first form lists the names of all xattrs on the given file(s).z=The second form (-p) prints the value of the xattr attr_name.zHThe third form (-w) sets the value of the xattr attr_name to attr_value.z1The fourth form (-d) deletes the xattr attr_name.z0The fifth form (-c) deletes (clears) all xattrs.zoptions:z  -h: print this helpz@  -s: act on symbolic links themselves rather than their targetsz/  -l: print long format (attr_name: attr_value)zJ  -z: compress or decompress (if compressed) attribute value in zip format@   )printospathbasenamesysargv)enames     r   usager   (   s    ab	77CHHQK(D	
67	T
CD	t
MN	4
AB	
78	"I	
NO	
IJ	
TU	
=>	
<=	"I	*	
!"	
LM	
;<	
VWr   r         .c           
      0   / n[        S[        U 5      U5       He  nXX1-    nSR                  U Vs/ s H  nS[        U5      -  PM     sn5      nUR	                  [
        5      nUR                  SX1S-  Xg4-  5        Mg     SR                  U5      $ s  snf )Nr    z%02Xz%04X   %-*s   %s
r   r   )rangelenjoinord	translate_FILTERappend)srclengthresultisxhexa	printables           r   _dumpr0   I   s    F1c#h'!(Oxx!4!Q#a&!45KK(	*a4-KKL	 (
 776? 5s   B
c           	      
  ^^  [         R                   " U SS  SS/5      u  pS nSnSnSnSnSn	Sn
S nUn/ mU GH  u  pUS;   a  [        5       s  $ US:X  a  SnM"  US	:X  a  Sn
M,  US
:X  a&  SnU(       d  U(       d  U	(       a  [        S5      s  $ MX  US:X  a&  SnU(       d  U(       d  U	(       a  [        S5      s  $ M  US:X  a&  SnU(       d  U(       d  U	(       a  [        S5      s  $ M  US:X  a&  Sn	U(       d  U(       d  U(       a  [        S5      s  $ M  US:X  d  M  [        R                  n[        R
                  nGM     U(       d  U(       d  U	(       a  U(       a  [        S5      $ U(       d  U(       d  U(       a#  U(       d  [        S5      $ UR                  S5      nU(       a2  U(       d  [        S5      $ UR                  S5      R                  S5      n[        U5      S:X  a  [        S5      $ [        U5      S:  a  SnOSnSnU
(       a  U[        R                  -  nU GH  mUU4S jn [        R                  " TUS9nU(       a   U" W5      UU'   M6  U(       a   UU	 MC  U	(       a   UR                  5         M]   U(       a  U4nOUR                  5       n U(       a  T< S3nOSnU GH  nSn  U" UU   5      n SU;   a  ["        eUR%                  S5      nU(       a`  U(       a6  [)        SR+                  UU< S 345      5        [)        [-        U5      5        Mu  [)        SR+                  UU< S3U45      5        M  U(       aM  U(       a(  U(       a  [)        U5        [)        [-        U5      5        M  [)        SR+                  UU45      5        M  [)        SR+                  UU45      5        GM     GM     T(       a  S$ S$ ! [         R                   a  n[        U5      s S nA$ S nAff = f! [        [        4 a  nU" U5         S nAGM  S nAff = f! [        [        4 a  nU" U5         S nAGM  S nAff = f! [        [        4 a  nU" U5         S nAGMB  S nAf[         a    U" SU< 35         GM_  f = f! [        [        4 a  nU" U5         S nAGM  S nAff = f! [        [        4 a  nU" U5         S nAGM  S nAff = f! [        R                    a	    UU   n GN.f = f! [&        ["        4 a    UR%                  S5      nSn GN:f = f! [         a    U" U< SU< 35         GM  f = f)!N   hlpwdzschelpFc                     U $ Nr   r-   s    r   <lambda>main.<locals>.<lambda>`   s    r   )z-hz--helpz-lTz-sz-pz -p not allowed with -w, -d or -cz-wz -w not allowed with -p, -d or -cz-dz -d not allowed with -p, -w or -cz-cz -c not allowed with -p, -w or -dz-zz -l not allowed with -w, -d or -czNo attr_namer   zNo attr_valuezutf-8zNo filec                   > TR                  U 5        [        R                  R                  T5      (       d%  [        R
                  R                  ST< S35        g [        R
                  R                  [        U 5      S-   5        g )NzNo such file: 
)r'   r   r   existsr   stderrwritestr)r   errorsfilenames    r   onErrormain.<locals>.onError   sQ    MM!77>>(++

  !CD

  Q$/r   )optionszNo such xattr: z: r       zlatin-1:)getoptGetoptErrorr   zlibcompress
decompresspopencoder"   xattrXATTR_NOFOLLOWIOErrorOSErrorKeyErrorclearkeyserrorr   decodeUnicodeDecodeErrorr   r#   r0   )r   optargsargsr   	attr_namelong_formatreadr>   deleterS   nofollowrJ   rK   optarg
attr_valuemultiple_filesrD   rB   attrs
attr_namesfile_prefixshould_dumpr@   rA   s                          @@r   mainrg   S   s    --QR*vhG IKDEFEHHJF""7ND[KD[HD[D%?@@ #(D[Ev?@@ "'D[Fu?@@ !&D[Eu?@@ !'D[}}HJ3 6 %;<<u((HHQK	))XXa[''0

4yA~Y
4y1}G5'''	0	KK':E
 #+J#7i 
 )$ "+J!&J
 (02 '	#6%/i0@%A
+ J."//%/%6%6w%?
 "bgg{Y4H&IJKeJ/0bgg{i4I:&VWX&* %k 2!%
"34!"'';
*C"DEbgg{I&>?@E (k r 1Ay  QxZ ! 	AJ	 W% 
 W% 
 y:; W% 
 W% 
  :: 6%*9%5
6 /> +%/%6%6y%A
&*+   [)LMs   O 2O;P"$Q	1R	
R0R0:SS7O8#
O3-O83O8;PPP"Q2QQ	RQ((RR	R-R((R-0S SSS40T!3S44T!7#TT!TT!!T?>T?__main__r6   )   )
__future__r   r   r   rG   rI   rN   	Exceptionr   r   r#   r!   r"   asciichrr&   r0   r   rg   r   exitr7   s   0r   <module>ro      s   4 & 
 	   I < ((%PS*U*QSs1v'1,8#a&@D@*U
V hh _B zHHT#((^ ] Vs    9B?