403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/fileutil.cpython-39.pyc
a

�ab��	@s�dZddlZddlZddlmZmZmZddlmZddl	m
Z
mZddlm
Z
er`ddlmZdeeeddd	�d
d�Zdd
�dddfeee
edeeegdfdd�dd�ZdS)z�
    sphinx.util.fileutil
    ~~~~~~~~~~~~~~~~~~~~

    File utility functions for Sphinx.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Callable�Dict)�
relative_path)�copyfile�	ensuredir)�PathMatcher)�BaseRendererr	)�source�destination�context�renderer�returnc	Cs�tj�|�sdStj�|�r2tj�|tj�|��}|���d�r�|dur�|durbddlm	}|�}t
|dd��n}|���d�r�|dd�}t
|ddd��&}|�|�|�
�|��Wd�n1s�0YWd�q�1s�0Yn
t||�dS)	a�Copy an asset file to destination.

    On copying, it expands the template variables if context argument is given and
    the asset is a template file.

    :param source: The path to source file
    :param destination: The path to destination file or directory
    :param context: The template variables.  If not given, template files are simply copied
    :param renderer: The template engine.  If not given, SphinxRenderer is used by default
    NZ_tr��SphinxRendererzutf-8)�encoding����w)�os�path�exists�isdir�join�basename�lower�endswith�sphinx.util.templater�open�writeZ
render_string�readr)r
rrr
r�fsrc�fdst�r"�8/usr/lib/python3.9/site-packages/sphinx/util/fileutil.py�copy_asset_filesTr$cCsdS)NFr")rr"r"r#�<lambda>9�r%)r
r�excludedrr
�onerrorrcCs8tj�|�sdS|dur*ddlm}|�}t|�tj�|�rPt||||�dStj|dd�D]�\}}}	t	||�}
|dd�D]2}|t
�|
|��r�|�|�q~tt
�||
|��q~|	D]z}|t
�|
|��s�z"tt
�||�t
�||
�||�Wq�t
�y.}
z(|�r|t
�||�|
�n�WYd}
~
q�d}
~
00q�q^dS)aMCopy asset files to destination recursively.

    On copying, it expands the template variables if context argument is given and
    the asset is a template file.

    :param source: The path to source file or directory
    :param destination: The path to destination directory
    :param excluded: The matcher to determine the given path should be copied or not
    :param context: The template variables.  If not given, template files are simply copied
    :param renderer: The template engine.  If not given, SphinxRenderer is used by default
    :param onerror: The error handler.
    NrrT)�followlinks)rrrrrr�isfiler$�walkr�	posixpathr�remove�	Exception)r
rr'rr
r(r�root�dirs�filesZreldir�dir�filename�excr"r"r#�
copy_asset9s4

�r5)NN)�__doc__rr,�typingrrrZdocutils.utilsrZsphinx.util.osutilrrZsphinx.util.typingrrr	�strr$r.r5r"r"r"r#�<module>s&
��!��

Youez - 2016 - github.com/yon3zu
LinuXploit