403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/fs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/fs/__pycache__/wrap.cpython-312.pyc
�

��obw&����dZddlmZmZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZdd	lmZej$r6dd
lmZmZmZmZmZmZmZmZmZmZddlmZddlmZdd
lm Z ddl!m"Z"ddl#m$Z$ejJdd��Z&ejJdd��Z'ejJddd��Z(d�Z)d�Z*Gd�dee(ejVe(�Z,Gd�dee(ejVe(�Z-y)awCollection of useful `~fs.wrapfs.WrapFS` subclasses.

Here's an example that opens a filesystem then makes it *read only*::

    >>> home_fs = fs.open_fs('~')
    >>> read_only_home_fs = fs.wrap.read_only(home_fs)
    >>> read_only_home_fs.removedir('Desktop')
    Traceback (most recent call last):
      ...
    fs.errors.ResourceReadOnly: resource 'Desktop' is read only

�)�print_function�unicode_literalsN�)�ResourceNotFound�ResourceReadOnly)�Info)�check_writable)�abspath�normpath�split)�WrapFS)
�IO�Any�BinaryIO�
Collection�Dict�Iterator�Mapping�Optional�Text�Tuple)�datetime)�FS)�RawInfo)�Permissions)�SubFS�_Wr
)�bound�_Tr�_FT)r�	covariantc��t|�S)z�Make a read-only filesystem.

    Arguments:
        fs (FS): A filesystem instance.

    Returns:
        FS: A read only version of ``fs``

    )�WrapReadOnly��fss �)/usr/lib/python3/dist-packages/fs/wrap.py�	read_onlyr'3s������c��t|�S)aMake a filesystem that caches directory information.

    Arguments:
        fs (FS): A filesystem instance.

    Returns:
        FS: A filesystem that caches results of `~FS.scandir`, `~FS.isdir`
        and other methods which read directory information.

    )�
WrapCachedDirr$s r&�cache_directoryr+As�����r(c�F��eZdZdZdZ�fd�Z		dd�Zd	d�Zd�Zd�Z	�xZ
S)
r*a�Caches filesystem directory information.

    This filesystem caches directory information retrieved from a
    scandir call. This *may* speed up code that calls `~FS.isdir`,
    `~FS.isfile`, or `~FS.gettype` too frequently.

    Note:
        Using this wrap will prevent changes to directory information
        being visible to the filesystem object. Consequently it is best
        used only in a fairly limited scope where you don't expected
        anything on the filesystem to change.

    z
cached-dirc�:��tt|�|�i|_y�N)�superr*�__init__�_cache)�self�wrap_fs�	__class__s  �r&r0zWrapCachedDir.__init__qs���
�m�T�+�G�4���r(c�P�tt|��}|t|xsd�f}||jvrG|jj|||��}|D�cic]}|j|��}}||j|<t|j|j��}	|	Scc}w)N�)�
namespaces�page)	r
r�	frozensetr1�_wrap_fs�scandir�name�iter�values)
r2�pathr7r8�_path�	cache_key�_scan_result�info�_dir�gen_scandirs
          r&r;zWrapCachedDir.scandirvs�������'���I�j�&6�B�7�8�	��D�K�K�'��=�=�0�0��*�SW�0�X�L�0<�=��D�I�I�t�O�=�D�=�%)�D�K�K�	�"��4�;�;�y�1�8�8�:�;�����>s�B#c�2�tt|��}|dk(rtdddd�i�St|�\}}|t	|xsd�f}||j
vr|j
||��|j
|}	||}|S#t$rt|��wxYw)N�/�basic�T)r<�is_dirr6)r7)	r
rrrr9r1r;�KeyErrorr)	r2r?r7r@�dir_path�
resource_namerArDrCs	         r&�getinfozWrapCachedDir.getinfo�s�������'���C�<���2��">�?�@�@�"'��,���-��y��)9�r�:�;�	��D�K�K�'��L�L��j�L�9��{�{�9�%��	)��
�&�D�����	)�"�4�(�(�	)�s�:B�Bc�X�	|j|�jS#t$rYywxYw�NF�rNrJr�r2r?s  r&�isdirzWrapCachedDir.isdir�s.��	��<�<��%�,�,�,���	��	�s��	)�)c�Z�	|j|�jS#t$rYywxYwrPrQrRs  r&�isfilezWrapCachedDir.isfile�s1��	��|�|�D�)�0�0�0�0���	��	�s��	*�*�NNr.)�__name__�
__module__�__qualname__�__doc__�	wrap_namer0r;rNrSrU�
__classcell__)r4s@r&r*r*Ps0����<�I���
�	� �$�r(r*c���eZdZdZdZd�Z			dd�Z		dd�Zdd�Zdd�Z	d	�Z
d
�Zd�Zd�Z
			dd
�Zdd�Zdd�Zdd�Z		dd�Z						dd�Zd�Zdd�Z			d d�Zd�Zd!d�Zy)"r#z�Makes a Filesystem read-only.

    Any call that would would write data or modify the filesystem in any way
    will raise a `~fs.errors.ResourceReadOnly` exception.

    z	read-onlyc�8�|j�t|��r.��checkr)r2r?�datas   r&�appendbyteszWrapReadOnly.appendbytes�����
�
���t�$�$r(Nc�8�|j�t|��r.r_)r2r?�text�encoding�errors�newlines      r&�
appendtextzWrapReadOnly.appendtext����	
�
�
���t�$�$r(c�8�|j�t|��r.r_�r2r?�permissions�recreates    r&�makedirzWrapReadOnly.makedir����	
�
�
���t�$�$r(c�8�|j�t|��r.r_�r2�src_path�dst_path�	overwrite�
preserve_times     r&�movezWrapReadOnly.move�����
�
���x�(�(r(c��|j�t|�rt|��|jj|f|dd�|��S)N���)�mode�	buffering)r`r	rr:�openbin)r2r?r{r|�optionss     r&r}zWrapReadOnly.openbin�sA���
�
���$��"�4�(�(�$�t�}�}�$�$�T�N���N�g�N�Nr(c�8�|j�t|��r.r_rRs  r&�removezWrapReadOnly.remove�rcr(c�8�|j�t|��r.r_rRs  r&�	removedirzWrapReadOnly.removedir�rcr(c�8�|j�t|��r.r_rRs  r&�
removetreezWrapReadOnly.removetree�rcr(c�8�|j�t|��r.r_)r2r?rCs   r&�setinfozWrapReadOnly.setinfo�rcr(c�8�|j�t|��r.r_)r2r?�contentsrfrgrhs      r&�	writetextzWrapReadOnly.writetext�rjr(c�8�|j�t|��r.r_)r2r?�accessed�modifieds    r&�settimeszWrapReadOnly.settimes�rcr(c�8�|j�t|��r.r_rrs     r&�copyzWrapReadOnly.copy�rxr(c�8�|j�t|��r.r_)r2r?�wipes   r&�createzWrapReadOnly.creatercr(c�8�|j�t|��r.r_rls    r&�makedirszWrapReadOnly.makedirsrpr(c
��|j�t|�rt|��|jj|f||||||d�|��S)N)r{r|rfrgrh�line_buffering)r`r	rr:�open)	r2r?r{r|rfrgrhr�r~s	         r&r�zWrapReadOnly.opens]��	
�
�
���$��"�4�(�(�!�t�}�}�!�!��	
������)�	
��	
�		
r(c�8�|j�t|��r.r_)r2r?r�s   r&�
writebyteszWrapReadOnly.writebytes+rcr(c�8�|j�t|��r.r_)r2r?�file�
chunk_sizer~s     r&�uploadzWrapReadOnly.upload0rcr(c�8�|j�t|��r.r_)r2r?r�rfrgrhs      r&�	writefilezWrapReadOnly.writefile5rjr(c�8�|j�t|��r.r_rRs  r&�touchzWrapReadOnly.touchArcr(c��|j�t|j�j|���}|j	dd��|S)N)�	namespaceTF)r'�supports_rename)r`�dict�delegate_fs�getmeta�update)r2r��metas   r&r�zWrapReadOnly.getmetaFsA���
�
���D�$�$�&�.�.��.�C�D�����d�E��:��r()zutf-8NrIrP)FF)�rrzrV)F)r�rzNNrIFr.)NNrI)�standard)rWrXrYrZr[rbrirorwr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r6r(r&r#r#�s�����I�%����
%���	%�)�
O�%�
%�
%�
%����
%�%�
)�
%���	%�������
�4%�
%����
%�%�
r(r#).rZ�
__future__rr�typingrgrrrCrr{r	r?r
rr�wrapfsr
�
TYPE_CHECKINGrrrrrrrrrrr�baserrrmr�subfsr�TypeVarrrr r'r+�Genericr*r#r6r(r&�<module>r�s����8�
�6�� �*�*��	������"���(���V�^�^�D��)���V�^�^�D��%���V�^�^�D���5����T�F�2�J����r� 2�T�nd�6�"�:�v�~�~�b�1�dr(

Youez - 2016 - github.com/yon3zu
LinuXploit