ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/Filer.cpython-311.pyc

�

�܋fV��X�dZGd�d��ZGd�d��ZGd�d��ZdS)zD Handles filing of data from low-level gsl filing and data records.
c�0�eZdZd�Zd�ZeZd�Zd�Zd�ZdS)�Filerc�Z�||_g|_i|_|�|��dS�N)�mod�writefile_envs�writefile_names�accept)�selfr�nodes   �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/guppy/gsl/Filer.py�__init__zFiler.__init__s1����� ���!������D������c�0�|�|��dSr)�children_accept�r
rs  r�
visit_filezFiler.visit_file
s�����T�"�"�"�"�"rc��|j}||jvrtd|z���||j|<|j�t||����dS)NzDuplicate file name: %r)�argr�SyntaxErrorr�append�	WriteFile)r
r�names   r�visit_write_filezFiler.visit_write_files_���x���4�'�'�'��7�$�>�?�?�?�%)���T�"���"�"�9�T�4�#8�#8�9�9�9�9�9rc�~�g}|jD]}|�d|jz��� d�|��S)N�write file: %s�
)rr�	file_name�join)r
�infos�es   r�get_infozFiler.get_infosH�����$�	9�	9�A��L�L�)�A�K�7�8�8�8�8��y�y����rc�B�|jD]}|����dSr)r�write)r
r s  rr#zFiler.writes-���$�	�	�A�
�G�G�I�I�I�I�	�	rN)	�__name__�
__module__�__qualname__r
r�visit_stringrr!r#�rrrrsf���������#�#�#��L�:�:�:� � � �����rrc�:�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
dS)rNc���||_|jx|_}||_|j|_|�|��|j�d}n|jj}||_|j�d}n|jj}||_	dS)N�)
�filerr�	node_filerrr�	node_data�data�	node_mode�mode)r
r,rrr/r1s      rr
zWriteFile.__init__(s����
���"���3�����������T�"�"�"��>�!��D�D��>�%�D���	��>�!��D�D��>�%�D���	�	�	rc�2�|�d|��dS)Nr.��
set_singlers  r�
visit_textzWriteFile.visit_text:�������T�*�*�*�*�*rc�2�|�d|��dS)N�node_endr3rs  r�	visit_endzWriteFile.visit_end=s�����
�D�)�)�)�)�)rc�2�|�d|��dS)Nr0r3rs  r�
visit_modezWriteFile.visit_mode@r6rc��t||d���td|�d|j�����t|||��|�|d��dS)Nz
Duplicate z
 at index �no_node_expected)�getattrr�index�setattrr)r
rrs   rr4zWriteFile.set_singleCs`���4��t�$�$�0��+�D�D�D�$�*�*�M�N�N�N���d�D�!�!�!����T�#5�6�6�6�6�6rc�$�|jj}|jjrW|j|jjz}|�|j|j|jz��r|�|j|��|�|j|j	��dSr)
r�IO�
backup_suffixr�access�R_OK�W_OK�rename�
write_filer/)r
rB�backup_names   rr#zWriteFile.writeIs~��
�X�[���8�!�	7��.�4�8�+A�A�K��y�y�����2�7�):�;�;�
7��	�	�$�.�+�6�6�6�
�
�
�d�n�d�i�0�0�0�0�0r)r$r%r&r.r0r
r5r9r;r4r#r(rrrr$sx�������I��I����$+�+�+�*�*�*�+�+�+�7�7�7�1�1�1�1�1rrc�*�eZdZdZdZdZdZd�Zd�ZdS)�_GLUECLAMP_)z_parent.FileIO:IO)rCz
,gsl-backupedz
.tag writefile

c�"�t||��Sr)rrs  rr,z_GLUECLAMP_.filergs���T�4� � � rc	�l�|j}|jj}|���}|j�|d��}d}d|�d|�d�}|�|��}|�|��}|���d|zksJ�|�	��|�
|��}	|	|ksJ�d}
d}d|�d|
�d|d	z�d|�d�	}|�|��}|�|��}|�	��|�
||jz��|ksJ�|�
|��}	|	|
ksJ�|�
|d	z��|ksJ�	|�|��D]0}|�
|j�||�����1|�|��dS#|�|��D]0}|�
|j�||�����1|�|��wxYw)
N�x�helloz
.write file: z
..text
z
..end
rzhello2
z
hello3z.3)rB�_parent�	SpecNodes�mkdtemp�pathr�node_of_stringr,r!r#�	read_filerC�listdir�remove�rmdir)
r
rB�N�tempdir�tempnamer/�Xr�f�d�data2�data3rs
             r�_test_main_z_GLUECLAMP_._test_main_jsH��
�W���L�"���*�*�,�,���7�<�<���-�-����)	��x�x�����A��#�#�A�&�&�D��
�
�4� � �A��:�:�<�<�#3�h�#>�>�>�>�>�
�G�G�I�I�I����X�&�&�A���9�9�9�9�
�E��E�E��x�x������
�
�
�u�u�u�.�A��#�#�A�&�&�D��
�
�4� � �A�
�G�G�I�I�I��<�<���);� ;�<�<��D�D�D�D����X�&�&�A���:�:�:�:��<�<���
�.�.�%�7�7�7�7�7��
�
�7�+�+�
7�
7���	�	�"�'�,�,�w��5�5�6�6�6�6��H�H�W��������
�
�7�+�+�
7�
7���	�	�"�'�,�,�w��5�5�6�6�6�6��H�H�W�������s�D3G�AH3N)	r$r%r&�	_imports_�	_setable_rC�
syntax_gslr,rar(rrrKrKSsN�������I�!�I�$�M��J�
!�!�!�/�/�/�/�/rrKN)�__doc__rrrKr(rr�<module>rfs�������������>,1�,1�,1�,1�,1�,1�,1�,1�^F�F�F�F�F�F�F�F�F�Fr

Zerion Mini Shell 1.0