관리-도구
편집 파일: _path.cpython-38.pyc
U +�e � @ s� d dl Z d dlZd dlmZmZ eeeeedf f Ze �� fed�dd�Z ej eeeef d�dd ��Zejed�d d��Z ejed�dd��Z dS ) � N)�Dict�Union� FilesSpec)�specc C s* | � � D ]\}}t|t�|�| � qdS )aX Build a set of files/directories, as described by the spec. Each key represents a pathname, and the value represents the content. Content may be a nested directory. >>> spec = { ... 'README.txt': "A README file", ... "foo": { ... "__init__.py": "", ... "bar": { ... "__init__.py": "", ... }, ... "baz.py": "# Some code", ... } ... } >>> target = getfixture('tmp_path') >>> build(spec, target) >>> target.joinpath('foo/baz.py').read_text(encoding='utf-8') '# Some code' N)�items�create�pathlib�Path)r �prefix�name�contents� r �M/opt/hc_python/lib/python3.8/site-packages/importlib_resources/tests/_path.py�build s r )�contentc C s |j dd� t| |d� d S )NT)�exist_ok)r )�mkdirr �r �pathr r r r '