| 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 : |
a
�ab� � @ s� d Z ddlZddlZddlmZmZmZ ddlmZ ddl m
Z
mZ ddlm
Z
er`ddlmZ deeeddd �d
d�Zdd
� dddfeee
edeeegdf dd�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 C s� t j�| �sdS t j�|�r2t j�|t j�| ��}| �� �d�r�|dur�|du rbddlm } |� }t
| dd��n}|�� �d�r�|dd� }t
|ddd��&}|�|�|�
� |�� W d � n1 s�0 Y W d � q�1 s�0 Y n
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
r r r
r �fsrc�fdst� r"