"""
This type stub file was generated by pyright.
"""

import os
from typing import Callable, TYPE_CHECKING
from sphinx.util.template import BaseRenderer
from sphinx.util.typing import PathMatcher

"""File utility functions for Sphinx."""
if TYPE_CHECKING:
    ...
def copy_asset_file(source: str | os.PathLike[str], destination: str | os.PathLike[str], context: dict | None = ..., renderer: BaseRenderer | None = ...) -> None:
    """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
    """
    ...

def copy_asset(source: str | os.PathLike[str], destination: str | os.PathLike[str], excluded: PathMatcher = ..., context: dict | None = ..., renderer: BaseRenderer | None = ..., onerror: Callable[[str, Exception], None] | None = ...) -> None:
    """Copy 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.
    """
    ...

