__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�u�c�f��p�SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKrSSK	J
r
Jr SSKJ
r
 Sr0rSrSqSrSq\R(SS:�rSrS3S	jr"S
S\5r"SS
\5r"SS\5r"SS5r"SS\5r"SS5r "SS\5r!\"SS5r"\"SS5r#\"SS5r$\"SS5r%\"SS5r&\"SS 5r'\"SS!5r(\"SS"5r)\"SS#5r*\"SS$5r+S%q,S&r-S'r.S(r/S4S)jr0S4S*jr1S+r2S5S,jr3S6S-jr4S.r5\(aS/r6OS0r6Sq7S%q8S1r9S2r:g)7a�
This module is based on a rox module (LGPL):

http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/mime.py?rev=1.21&view=log

This module provides access to the shared MIME database.

types is a dictionary of all known MIME types, indexed by the type name, e.g.
types['application/x-python']

Applications can install information about MIME types by storing an
XML file as <MIME>/packages/<application>.xml and running the
update-mime-database command, which is provided by the freedesktop.org
shared mime database package.

See http://www.freedesktop.org/standards/shared-mime-info-spec/ for
information about the format of these files.

(based on version 0.13)
�N)�
BaseDirectory)�minidom�
XML_NAMESPACE)�defaultdictz5http://www.freedesktop.org/standards/shared-mime-info�c��SRURVs/sHoRPM sn5R5$s snf)zGet text of XML node�)�join�
childNodes�	nodeValue�strip)�node�ns  �*/usr/lib/python3/dist-packages/xdg/Mime.py�_get_node_datar-s2��
�7�7����9��A�K�K��9�:�@�@�B�B��9s�Ac��[X5$)z�Get the MIMEtype object for the given type.

This remains for backwards compatibility; calling MIMEtype now does
the same thing.

The name can either be passed as one part ('text/plain'), or as two
('text', 'plain').
)�MIMEtype��media�subtypes  r�lookupr1s���E�#�#�c�`^�\rSrSrSrS
U4SjjrSrSrSrSr	Sr
S	rS
rSr
SrU=r$)r�<z�Class holding data about a MIME type.

Calling the class will return a cached instance, so there is only one 
instance for each MIME type. The name can either be passed as one part
('text/plain'), or as two ('text', 'plain').
c�$>�UcSU;aURSS5upSU;deUR5nUR5n[X4$![a3 [[
U]U5nURX5 U[X4'Us$f=f)N�/�)�split�lower�types�KeyError�superr�__new__�_init)�clsrr�mtype�	__class__s    �rr#�MIMEtype.__new__Cs�����?�s�e�|�"�[�[��a�0�N�E��'�!�!�!����
���-�-�/��	��%�)�*�*���	��(�C�0��5�E��K�K��'�&+�E�5�"�#��L�		�s�	A�:B�Bc�*�XlX lSUlg�N)rr�_comment)�selfrrs   rr$�MIMEtype._initUs���
�����
rc�
�[RRSURURS-5n[
R"U5H�n[R"U5nUcMURR[S5HonUR[S5=(d SnSU[RR ;-nX`R"S:�aU[%U54UlUS	:XdMn  g M� g)
z>Loads comment for current language. Use get_comment() instead.�mime�.xmlN�comment�lang�enrr�)�os�pathr
rrr�load_data_pathsr�parse�documentElement�getElementsByTagNameNS�FREE_NS�getAttributeNSr�xdg�Locale�langsr+r)r,�resourcer6�docr1r2�goodnesss       r�_load�MIMEtype._loadZs����7�7�<�<���
�
�D�L�L�6�4I�J��!�1�1�(�;�D��-�-��%�C��{���.�.�E�E�g�y�Y���-�-�m�V�D�L������
�
�(8�(8� 8�9���m�m�A�.�.�%-�~�g�/F�$G�D�M��q�=�&�Z�	<rc�~�URc"S[U54UlUR5 URS$)z;Returns comment for current language, loading it if needed.rr)r+�strrC�r,s r�get_comment�MIMEtype.get_commentis5���=�=� ���D�	�N�D�M��J�J�L��}�}�Q��rc�h�[5 [U5nU[;a[[U5$U$)z:Returns the canonical MimeType object if this is an alias.)�update_cacherF�aliasesr)r,�ss  r�	canonical�MIMEtype.canonicalqs+������I����<��'�!�*�%�%��rc�Z�[5 [S[[U555$)z5Returns a set of Mime types which this inherits from.c3�8# �UHn[U5v� M g7fr*)r)�.0�ts  r�	<genexpr>�)MIMEtype.inherits_from.<locals>.<genexpr>|s���=�&<��6�!�9�9�&<�s�)rK�set�inheritancerFrGs r�
inherits_from�MIMEtype.inherits_fromys!�����=�k�#�d�)�&<�=�=�=rc�:�URS-UR-$)NrrrGs r�__str__�MIMEtype.__str__~s���z�z�C��$�,�,�.�.rc�@�SUR<SUR<S3$)Nz	MIMEtype(z, �)rrGs r�__repr__�MIMEtype.__repr__�s��%)�Z�Z����>�>rc�X�[UR5[UR5-$r*)�hashrrrGs r�__hash__�MIMEtype.__hash__�s���D�J�J��$�t�|�|�"4�4�4r)r+rrr*)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r#r$rCrHrNrXr[r_rc�__static_attributes__�
__classcell__)r's@rrr<s:����
�$�
)� ��>�
/�?�5�5rrc��\rSrSrSrg)�UnknownMagicRuleFormat��N)rerfrgrhrjrorrrmrm�s��rrmc��\rSrSrSrSrg)�DiscardMagicRules�zGRaised when __NOMAGIC__ is found, and caught to discard previous rules.roN)rerfrgrhrirjrorrrqrq�s��M�rrqc�j�\rSrSrSrSr\R"S5r\	S5r
SrSrSr
S	rS
rg)�	MagicRule�Nc�@�XlX lX0lX@lXPlgr*��start�value�mask�word�range)r,rxryrzr{r|s      r�__init__�MagicRule.__init__�s���
��
��	��	��
rs(?:~(\d+))?(?:\+(\d+))?\n$c�|�UR5nURSS5up2U(a[U5OSnURSS5upB[U5nUS:Xa[e[R
SS:�a[R
USSS	S
9nO [US5S-[US5-nUSSn[U5U::a#X!R5-
n[U5U::aM#USUX%Sp&URS5(aA[U5U::a#X!R5-
n[U5U::aM#USUS-X%S-Sp'OSnURRU5nU(d[[U55eUR5up�U	b[U	5OSn	U
b[U
5OSn
X0"XFXyU
54$)
zbRead a rule from the binary magics file. Returns a 2-tuple of
the nesting depth and the MagicRule.�>rr�=s__NOMAGIC__
rNr4�big)�	byteorder��&)�readliner�intrq�sys�version_info�
from_bytes�ord�len�
startswith�rule_ending_re�matchrm�repr�groups)r%�f�line�
nest_depthrx�lenvalueryrz�endingr{r|s           r�	from_file�MagicRule.from_file�s����z�z�|�� �:�:�d�A�.��
�(2�S��_��
��j�j��q�)����E�
���#�#�#�#����A��!�#��~�~�d�2�A�h�%�~�@�H��D��G��a���T�!�W��5�H��A�B�x���$�i�8�#��J�J�L� �D��$�i�8�#��9�H�o�t�I��t��?�?�4� � ��d�)�x�'��
�
��$���d�)�x�'��a���
�+�T�1�*�+�->�$��D��#�#�)�)�$�/���)��d��4�4��m�m�o���!�-�s�4�y�A��$�0��E�
�q���3�u�T��?�?�?rc���UR[UR5-UR-nUR(a#[XRR
55$U$r*)rxr�ryr|�also�max�maxlen)r,�ls  rr��MagicRule.maxlen�sE���J�J��T�Z�Z��(�4�:�:�5���9�9��q�)�)�*�*�,�-�-��rc��URU5(a-UR(aURRU5$gg)NT)�match0r�r��r,�buffers  rr��MagicRule.match�s3���;�;�v����y�y��y�y���v�.�.��rc���[U5n[UR5n[UR5H�nURU-nXS-nX&:a gUR(aoSn[U5H]n[
(aXU-URU-n	O)[
XU-5[
URU5-n	U[U	5-
nM_ OXUnXpR:XdM� g g)NFr	T)r�ryr|rxrz�PY3r��chr)
r,r�r�r��orM�e�test�i�cs
          rr��MagicRule.match0�s���

�f�+���t�z�z�?���t�z�z�"�A��j�j��l�A��j�A��s���y�y����x��A��s�"�Q�3�K�$�)�)�A�,�6�����s��,�s�4�9�9�Q�<�/@�@���C��F�N�D�)���{���Z�Z���##rc��SUR<SUR<SUR<SUR<SUR<S3$)NzMagicRule(start=z, value=z, mask=z, word=z, range=r^rwrGs rr_�MagicRule.__repr__�s/��"&�*�*�"&�*�*�"&�)�)�"&�)�)�"&�*�*�.�	.r)rzr|rxryr{)rerfrgrhr�r}�re�compiler��classmethodr�r�r�r�r_rjrorrrtrt�sF���D���Z�Z� >�?�N��2@��2@�h���,.rrtc�J�\rSrSrSrSrSrSr\S5r	\S5r
Srg	)
�
MagicMatchAny�z�Match any of a set of magic rules.

This has a similar interface to MagicRule objects (i.e. its match() and
maxlen() methods), to allow for duck typing.
c��Xlgr*��rules)r,r�s  rr}�MagicMatchAny.__init__s���
rc�B^�[U4SjUR55$)Nc3�D># �UHoRT5v� M g7fr*)r�)rR�rr�s  �rrT�&MagicMatchAny.match.<locals>.<genexpr>s����7�J�q�7�7�6�?�?�J�s� )�anyr�r�s `rr��MagicMatchAny.matchs����7�D�J�J�7�7�7rc�:�[SUR55$)Nc3�@# �UHoR5v� M g7fr*)r�)rRr�s  rrT�'MagicMatchAny.maxlen.<locals>.<genexpr>s���2�z�!�8�8�:�:�z�s�)r�r�rGs rr��MagicMatchAny.maxlens���2�t�z�z�2�2�2rc��URS5nURSS5 /nU(adUS:wa^UR[R	U55 URS5nU(aURSS5 U(aUS:waM^/nSU0nUH"upg/nXVRXx45 X�US-'M$ UR
U5$![
a N�f=f)z/Read a set of rules from the binary magic file.r����[r)�read�seek�appendrtr�rm�from_rule_tree)	r%r�r��depths_rules�tree�
insert_points�depth�rule�subruless	         rr��MagicMatchAny.from_file	s����&�&��)��	���r�1�
����A��I�
��#�#�I�$7�$7��$:�;��f�f�Q�i�A�����r�1�
��A��I����4��
�'�K�E��H�� �'�'��(8�9�%-�%��'�"�(�
�!�!�$�'�'��*�
��
�s�$C�
C�Cc���/nUH3up4U(aURU5UlURU5 M5 [U5S:Xag[U5S:XaUS$U"U5$)z�From a nested list of (rule, subrules) pairs, build a MagicMatchAny
instance, recursing down the tree.

Where there's only one top-level rule, this is returned directly,
to simplify the nested structure. Returns None if no rules were read.
rNr)r�r�r�r�)r%r�r�r�r�s     rr��MagicMatchAny.from_rule_tree#sd����"�N�D���.�.�x�8��	��L�L���#�
�u�:�q�=���u�:�q�=���8�O��5�z�rr�N)rerfrgrhrir}r�r�r�r�r�rjrorrr�r��s>���
�8�3��(��(�2���rr�c�@�\rSrSrSrSrSrS
SjrS
SjrSr	S	r
g)�MagicDBi7c�,�[[5Ulgr*)r�list�bytyperGs rr}�MagicDB.__init__8s��#�D�)��rc�p�[US5nUR5nUS:wa[S5eUR5RS5nU(dO�USS:wd	USSS	:wa[	S
U5eUSSRS5upV[
U5n[U5n[RU5nUcM�URURXX45 M�SSS5 g![a4 URRUS5 [RU5nNlf=f!,(df   g=f)
z<Read a magic binary file, and add its rules to this MagicDB.�rbsMIME-Magic
zNot a MIME magic file�asciir�[���Nz]
zMalformed section headingr�:)�openr��IOError�decode�
ValueErrorrr�rr�r�rqr��popr�)	r,�fnamer�r��shead�pri�tnamer&r�s	         r�
merge_file�MagicDB.merge_file;s ��
�%��
�!��:�:�<�D��(�(��5�6�6���
�
��+�+�G�4������8�s�?�e�B�C�j�E�&9�$�%@�%�H�H�"�1�R�[�.�.�s�3�
���#�h���u�
��6�(�2�2�1�5�D��<�����E�"�)�)�3�+�6�)��
��$)�6��K�K�O�O�E�4�0�(�2�2�1�5�D�6��%�
�s0�BD'�"C&�7&D'�&;D$�!D'�#D$�$D'�'
D5c� �Sn/UlURR5HFup#UH;upEURRXBU45 [	XR55nM= MH XlURR
SSS9 g)zcPrepare the MagicDB for matching.

This should be called after all rules have been merged into it.
rc��US$�Nrro��xs r�<lambda>�"MagicDB.finalise.<locals>.<lambda>fs���1�rT��key�reverseN)�alltypesr��itemsr�r�r��sort)r,r�r&r�r�r�s      r�finalise�MagicDB.finaliseXsz��
����
� �K�K�-�-�/�L�E�"�	���
�
�$�$�c�$�%7�8��V�[�[�]�3��#�0�
���
�
���~�t��<rNc��UbG/nUH.nURUHupxURXvU45 M M0 URSS9 OURnUH.up�nX�:�aM
X�:a gUR	U5(dM,U
s $ g)a%Do magic sniffing on some bytes.

max_pri & min_pri can be used to specify the maximum & minimum priority
rules to look for. possible can be a list of mimetypes to check, or None
(the default) to check all mimetypes until one matches.

Returns the MIMEtype found, or None if no entries match.
Nc��US$r�ror�s rr��$MagicDB.match_data.<locals>.<lambda>vs��Q�q�Tr)r�)r�r�r�r�r�)r,�data�max_pri�min_pri�possibler �mtr�r��priority�mimetypes           r�
match_data�MagicDB.match_datahs������E���!%���R��I�C��L�L�#�4��1�"1��
�J�J�>�J�*��M�M�E�(-�$�H���!���!���z�z�$�����).rc��[US5nURUR5nSSS5 URWX#U5$!,(df   N!=f)aeRead data from the file and do magic sniffing on it.

max_pri & min_pri can be used to specify the maximum & minimum priority
rules to look for. possible can be a list of mimetypes to check, or None
(the default) to check all mimetypes until one matches.

Returns the MIMEtype found, or None if no entries match. Raises IOError
if the file can't be opened.
r�N)r�r�r�r)r,r6r�r�r�r��bufs       rr��
MagicDB.match�sC���$��
���&�&����%�C�����s�G�h�?�?��
�s�A�
Ac�2�S[UR5-$)Nz<MagicDB (%d types)>)r�r�rGs rr_�MagicDB.__repr__�s��%��D�M�M�(:�:�:r)r�r�r�)�drN)rerfrgrhr}r�r�rr�r_rjrorrr�r�7s!��*�7�:=�  �8@�;rr�c�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
�GlobDBi�c�,�[[5Ulg)z�Prepare the GlobDB. It can't actually be used until .finalise() is
called, but merge_file() can be used to add data before that.
N)rrV�allglobsrGs rr}�GlobDB.__init__�s��
$�C�(��
rc	���URn[U5nUH�nURS5(aMUSSRS5nUSSupgn[	U5n[U5n	[
U5S:�aUSRS5n
OSn
US:XaURU	S5 M�X)RXh[U
545 M� SSS5 g!,(df   g=f)	z3Loads name matching information from a globs2 file.�#Nr�r�r�,ro�__NOGLOBS__)
rr�r�rr�rr�r��add�tuple)r,r6rr�r��fields�weight�	type_name�patternr&�flagss           rr��GlobDB.merge_file�s����=�=��
�$�Z�1����?�?�3�'�'���c�r�����-��-3�B�Q�Z�*��7��V����y�)���v�;��?�"�1�I�O�O�C�0�E��E��m�+��L�L���-����#�#�V�e�E�l�$C�D�#��Z�Z�s�B2C�
C!c��[[5Ul[[5Ul/Ul0Ul0UlURR5GHXupUR5nUGH;up4nSU;nURS5(amUSSnSU;dbSU;d\SU;dVU(a URURX45 O-URUR5RX45 M�SU;dSU;dSU;abU(aSO[Rn[R"[ R""U5US	9nURRXAU45 GMU(aX4URU'GMX4UR
UR5'GM> GM[ URR%S
SS9 g)
zbPrepare the GlobDB for matching.

This should be called after all files have been merged into it.
�csz*.r4N�*r��?r)rTc�<�US[USR54$)Nr4r)r�rr�s rr��!GlobDB.finalise.<locals>.<lambda>�s��Q�q�T�3�q��t�|�|�;L�4Mr)r�r�)rr��exts�
cased_exts�globs�literals�cased_literalsrr�rNr�r�rr��Ir��fnmatch�	translater�)	r,r&r$rrr�cased�rest�re_flagss	         rr��GlobDB.finalise�sr��
 ��%��	�%�d�+�����
���
� ��� �M�M�/�/�1�L�E��/�/�#�%�(-�$�f�u��E�M�E��!�!�$�'�'��q�r�{���t��s�d�{�c�T�k������-�4�4�e�_�E��	�	�$�*�*�,�/�6�6���G���w��#��.�C�7�N� %�1�2�4�4���*�*�W�%6�%6�w�%?�x�P���
�
�!�!�7�6�":�;��49�?�D�'�'��0�6;�_�D�M�M�'�-�-�/�2�1).�2�:	
�
�
����*M��Orc�^�[URU55S$![a gf=f)zLReturn the first match found for a given path, or None if no match
is found.rN)�next�_match_path�
StopIteration�r,r6s  r�first_match�GlobDB.first_match�s4��	���(�(��.�/��2�2���	��	�s��
,�,c�6�[URU55$)z<Return a list of (MIMEtype, glob weight) pairs for the path.)r�r0r2s  r�all_matches�GlobDB.all_matches�s���D�$�$�T�*�+�+rc#�# �[RRU5nX R;aURUv� UR	5nX0R
;aUR
Uv� UnUR
S5nUS:aO2XES-SnX@R;aURUHnUv� M	 MJUnUR
S5nUS:aO2XES-SnX@R;aURUHnUv� M	 MJURH#upxn	URU5(dMX�4v� M% g7f)z(Yields pairs of (mimetype, glob weight).r�.rN)r5r6�basenamer&rr%�findr#r"r$r�)
r,r6�leaf�lleaf�ext�p�res�regex�	mime_typers
          rr0�GlobDB._match_path�s0����w�w����%���&�&�&��%�%�d�+�+��
�
����M�M�!��-�-��&�&��������
�A��1�u�e��!�e�f�+�C��o�o�%��?�?�3�/�C��I�0���������
�A��1�u�e���c�d�)�C��i�i���9�9�S�>�C��I�*��+/�*�*�&�U�v��{�{�4� � � �)�)�+5�s�D0E�6
E)rr#r&r"r$r%N)rerfrgrhr}r�r�r3r6r0rjrorrrr�s#��)�E�.(P�T�,�!*rr�text�plain�applicationzoctet-stream�inode�blockdevice�
chardevice�	directory�fifo�socket�symlink�door�
executableFc�Z�Sq0q[[5q[
R"[RRSS55HLn[US5nUH.nUR5RSS5up4U[U'M0 SSS5 MN [5q[
R"[RRSS55Hn[RU5 M [R!5 [#5q[
R"[RRSS55Hn[$RU5 M [$R!5 [
R"[RRSS55H[n[US5nUH=nUR5RSS5upV[UR'U5 M? SSS5 M] g!,(df   GM�=f!,(df   M�=f)	NTr/rLr�r�globs2�magic�
subclasses)�_cache_uptodaterLrrVrWrr7r5r6r
r�r
rrr$r�r�r�rRr)r6r�r��aliasrN�sub�parents       r�_cache_databaserXs����O��G��c�"�K��-�-�b�g�g�l�l�6�9�.M�N��
�$��_����#'�:�:�<�#5�#5�d�A�#>� ��!*������_�O�
�H�E��-�-�b�g�g�l�l�6�8�.L�M��
�����N�	�N�N��
�I�E��-�-�b�g�g�l�l�6�7�.K�L��
�����M�	�N�N���-�-�b�g�g�l�l�6�<�.P�Q��
�$��_����"�j�j�l�0�0��q�9����C� �$�$�V�,���_�R�%�_��&�_�s�5H�7AH�
H	�
H*	c�0�[(d[5 ggr*)rTrXrorrrKrK=s���?���rc�@�[5 [RU5$)z6Returns type of file by its name, or None if not known)rKr$r3)r6s r�get_type_by_namer[As���N����T�"�"rc�B�[5 [RXU5$)z:Returns type of file by its contents, or None if not known)rKrRr�)r6r�r�s   r�get_type_by_contentsr]Fs���N��;�;�t�g�.�.rc�B�[5 [RXU5$)z0Returns type of the data, which should be bytes.)rKrRr)r�r�r�s   r�get_type_by_datar_Ls���N����D�7�3�3rc��[R"U5(a[$[R"U5(a[$[R
"U5(a[$[R"U5(a[$[R"U5(a[$[R"U5(a[$[$)z.Match special filesystem objects to Mimetypes.)�stat�S_ISDIR�	inode_dir�S_ISCHR�
inode_char�S_ISBLK�inode_block�S_ISFIFO�
inode_fifo�S_ISLNK�
inode_symlink�S_ISSOCK�inode_socket�
inode_door)�st_modes r�_get_type_by_statrpRs����|�|�G���Y�.�	
���g�	�	�z� 1�	
���g�	�	�{� 2�	
���w�	�	�
�!2�	
���g�	�	�}� 4�	
���w�	�	��!4��rc��[5 U(a[R"U5nO[R"U5n[R"UR5(ad[XS9nU(d[	U5nU(d	[XS9nUc4[R"UR5S-(a[$[
$U$[UR5$! [	U5nU=(d [
s$=f)a�Returns type of file indicated by path.

This function is *deprecated* - :func:`get_type2` is more accurate.

:param path: pathname to check (need not exist)
:param follow: when reading file, follow symbolic links
:param name_pri: Priority to do name matches. 100=override magic

This tries to use the contents of the file, and falls back to the name. It
can also handle special filesystem objects like directories and sockets.
)r�)r��I)rKr5ra�lstatr[rD�S_ISREGror]�S_IMODE�app_exerp)r6�follow�name_pri�strSs     r�get_typerz\s����N��������B����$��B�
�|�|�B�J�J��� ��8���&�t�,�!��*�4�B�!��9��|�|�B�J�J�'�%�/������� ����,�,��!��T�"���y�D��s�C�C�C=c�\�[5 U(a[R"U5O[R"U5n[R"UR5(d[UR5$[[RU5SSS9nU(aWUSSnSnUSSHupgXt:a O	US-
nM USUn[U5S:XaUSS$UVVs/sHupgUPM	 nnnOSn[RXS9n	U	(aU	$U(aUSS$[R""UR5S-(a[$$['U5(a[($[$![a [U5=(d [s$f=fs snnf![ a Sn	N�f=f)	a�Find the MIMEtype of a file using the XDG recommended checking order.

This first checks the filename, then uses file contents if the name doesn't
give an unambiguous MIMEtype. It can also handle special filesystem objects
like directories and sockets.

:param path: file path to examine (need not exist)
:param follow: whether to follow symlinks

:rtype: :class:`MIMEtype`

.. versionadded:: 1.0
c��US$)Nrror�s rr��get_type2.<locals>.<lambda>�s��A�a�DrTr�rrN)r�rr)rKr5rars�OSErrorr[�octet_streamrtrorp�sortedr$r6r�rRr�r�rurv�is_text_filerD)
r6rwry�mtypes�
max_weightr�r�wr�rSs
          r�	get_type2r��s{���N�6�$�R�W�W�T�]�"�(�(�4�.���<�<��
�
�#�#� ����,�,�
�E�%�%�d�+�.�4�
P�F�
��A�Y�q�\�
�
���A�B�Z�E�B��~��
��F�A� �������v�;�!���!�9�Q�<��#)�*�6�4�2�B�6��*������K�K��K�0��	���	��a�y��|��	
���b�j�j�	!�E�	)���#�D�)�)�t�;�|�;��G�6���%�5��5�6��&+�������s)�3E.�$F�9F�."F�F�F+�*F+c��[US5nU [URS55sSSS5 $![a gf=f!,(df   g=f)z�Guess whether a file contains text or binary data.

Heuristic: binary if the first 32 bytes include ASCII control characters.
This rule may change in future versions.

.. versionadded:: 1.0
r�F� N)r�r��_is_textr�)r6r�s  rr�r��sK�����t���
�����r�
�#�
��������
��s�4�A�
A�A�
Ac�0�[SU55(+$)Nc3�z# �UH1oS:*=(d! SUs=:*=(a S:Os =(d US:Hv� M3 g7f)r��r��Nro�rR�bs  rrT�_is_text.<locals>.<genexpr>�s-���N��A�C�x�?�3�!�?�?�d�?�?�a�4�i�?��s�9;�r��r�s rr�r��s���N��N�N�N�Nrc�0�[SU55(+$)Nc3�|# �UH2nUS:*=(d! SUs=:*=(a S:Os =(d US:Hv� M4 g7f)��� �Nror�s  rrTr��s9���+�%)���F�{�I�f��&:�&:�F�&:�I�a�6�k�I�%)�s�:<r�r�s rr�r��s!���+�%)�+�+�+�	+rc���[5 [(d[[[5q[
RR5H(upUHup4[URU5 M M* Sq[U$)a"Retrieve the set of filename extensions matching a given MIMEtype.

Extensions are returned without a leading dot, e.g. 'py'. If no extensions
are registered for the MIMEtype, returns an empty set.

The extensions are stored in a cache the first time this is called.

.. versionadded:: 1.0
T)	rK�_mime2ext_cache_uptodaterrV�_mime2ext_cacher$r"r�r)rr>r�r&�prios     r�get_extensionsr��sd���N�#�#�%�c�*�� �:�:�+�+�-�K�C�%�����&�*�*�3�/� &�.�$(� ��8�$�$rc�d�US-
n[U5nUR5nSSS5 [RR	SS5n[RR	X@5n[
R"U5H0n[U5nUR5nSSS5 WW:XdM0 g Sq[RR	[
R"U5U5n[US5nURW5 SSS5 Sn	[R"[RX�[
R"S55(a$[R"U5 [SU	-5eg!,(df   GNZ=f!,(df   N�=f! GM=f!,(df   N�=f)	aCopy 'package_file' as ``~/.local/share/mime/packages/<application>.xml.``
If package_file is None, install ``<app_dir>/<application>.xml``.
If already installed, does nothing. May overwrite an existing
file with the same name (if the contents are different)r0Nr/�packagesFr�zupdate-mime-databasez�The '%s' command returned an error code!
Make sure you have the freedesktop.org shared MIME package:
http://standards.freedesktop.org/shared-mime-info/)r�r�r5r6r
rr7rT�save_data_path�write�spawnlp�P_WAIT�unlink�	Exception)
rF�package_filer��new_data�package_dirr@r��old_data�new_file�commands
          r�install_mime_infor��sS��
�6��K�	
�l�	�q��6�6�8��
��'�'�,�,�v�z�2�K��w�w�|�|�K�5�H�
�
*�
*�8�
4��	��a��A��6�6�8����x���5��O��w�w�|�|�M�8�8��E�{�S�H�
�h��	��	�����
�%�G�	�z�z�"�)�)�W�}�/K�/K�F�/S�T�T�
�	�	�(���G�IP�Q�R�	R�U�9
�	�����	���
�	�sA�E5�F�F�F�5F!�5
F�
F	�F�F�F�!
F/r*)r
r)Tr
)T);rir5r�rar�r(r=r�
xdg.Locale�xml.domrr�collectionsrr;r r"r$r%rRr�r�rr�objectrr�rmr�rqrtr�r�rrDrrgrercrirmrkrnrvrTrXrKr[r]r_rprzr�r�r�r�r�r�r�rorr�<module>r�s����*
�	��
����*�#�
A��
����������
�����a���C�	$�I5�v�I5�V	�Z�	�	�	�	�i.�i.�X;�F�;�z\;�\;�|v*�V�v*�r�f�g����m�^�4���W�m�,��
�G�\�
*�
��7�K�(�	�
�G�V�
$�
��g�x�(���w�	�*�
�
�G�V�
$�
�
���
-���� -�D�#�
/�4��#-�J5<�n$� �O�+��� ��%�,'Rr

Filemanager

Name Type Size Permission Actions
BaseDirectory.cpython-313.pyc File 8.89 KB 0644
Config.cpython-313.pyc File 1.42 KB 0644
DesktopEntry.cpython-313.pyc File 25.28 KB 0644
Exceptions.cpython-313.pyc File 4.62 KB 0644
IconTheme.cpython-313.pyc File 23.22 KB 0644
IniFile.cpython-313.pyc File 17.07 KB 0644
Locale.cpython-313.pyc File 2.32 KB 0644
Menu.cpython-313.pyc File 55.46 KB 0644
MenuEditor.cpython-313.pyc File 26.44 KB 0644
Mime.cpython-313.pyc File 35.72 KB 0644
RecentFiles.cpython-313.pyc File 9.58 KB 0644
__init__.cpython-313.pyc File 2.11 KB 0644
util.cpython-313.pyc File 3.25 KB 0644
Filemanager