| 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 : |
�
��ob � � � d Z ddlmZmZ ddlZddlZddlmZmZm Z ej rddlmZmZm
Z
mZmZ ddlmZ ddlmZ d
d �Zy)zNRender a FS object as text tree views.
Color is supported on UNIX terminals.
� )�print_function�unicode_literalsN)�abspath�join�normpath)�List�Optional�Text�TextIO�Tuple� )�FS)�Infoc � � ��������
������������� �xs t j �|�t �dd� xs d}t �d� xr �j � } ��%t j
j
d� }
|
rdn| �|j � dk( r�r d}d�d�
d �nd
}d
�d�
d�d
�|dz ��fd���fd���fd���fd���fd��d� �d� �ddd����
����������� ������fd�� �t t |� � g � �d �d fS )a� Render a directory structure in to a pretty tree.
Arguments:
fs (~fs.base.FS): A filesystem instance.
path (str): The path of the directory to start rendering
from (defaults to root folder, i.e. ``'/'``).
file (io.IOBase): An open file-like object to render the
tree, or `None` for stdout.
encoding (str, optional): Unicode encoding, or `None` to
auto-detect.
max_levels (int, optional): Maximum number of levels to
display, or `None` for no maximum.
with_color (bool, optional): Enable terminal color output,
or `None` to auto-detect terminal.
dirs_first (bool): Show directories first.
exclude (list, optional): Option list of directory patterns
to exclude from the tree render.
filter (list, optional): Optional list of files patterns to
match in the tree render.
Returns:
(int, int): A tuple of ``(<directory count>, <file count>)``.
�encodingzutf-8�isatty�winFu │u ├u ──u └�|z--�`z z c � �� t | ��� y)zWrite a line to the output.)�fileN)�print)�liner s ��)/usr/lib/python3/dist-packages/fs/tree.py�writezrender.<locals>.writeP s �� � �d��� c � �� �s| S d| z S )zFormat the prefix lines.z[32m%s[0m� )�prefix�
with_colors �r �
format_prefixzrender.<locals>.format_prefixX s �� � ��M�"�V�+�+r c � �� �s| S d| z S )zFormat a directory name.z
[1;34m%s[0mr )�dirnamer s �r �format_dirnamezrender.<locals>.format_dirname_ s �� � ��N�$�w�.�.r c � �� �s| S d| z S )zFormat an error.z[31m%s[0mr )�msgr s �r �format_errorzrender.<locals>.format_errorf s �� � ��J�"�S�(�(r c �<