관리-도구
편집 파일: fake_open.cpython-311.pyc
� �܋fH4 � �� � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z mZmZm Z mZmZ ddlmZ ddlmZmZmZmZ ddlmZmZmZmZ erdd lmZ ed d� � Zdd ddddddd�Z G d� d� � Z dS )zGA fake open() function replacement. See ``fake_filesystem`` for usage. � N)� namedtuple)�S_ISDIR)�Optional�Union�Any�Tuple�cast�AnyStr� TYPE_CHECKING)�helpers)�FakePipeWrapper�FakeFileWrapper�FakeFile�AnyFileWrapper)� AnyString�is_root� PERM_READ� PERM_WRITE)�FakeFilesystem� _OpenModesz<must_exist can_read can_write truncate append must_not_exist)TTFFFF)FFTTFF)FFTFTF)TTTFFF)FTTTFF)FTTFTF)FFTFFT)FTTFFT)�r�w�azr+zw+za+�xzx+c � � e Zd ZdZd Z d!dddedefd�Zded ed efd�Z d"de e ef dedede e de e de e dedede e d efd�Zeded efd�� � Zde e de deded ef d�Zde e ef d ee e e e e e e e f fd�Zdede e de e d ee e ef fd �ZdS )#�FakeFileOpenz�Faked `file()` and `open()` function replacements. Returns FakeFile objects in a FakeFilesystem in place of the `file()` or `open()` function. F� filesystemr �delete_on_close�raw_ioc �0 � || _ || _ || _ dS )z� Args: filesystem: FakeFilesystem used to provide file system information delete_on_close: optional boolean, deletes file on close() N)r �_delete_on_closer )�selfr r r s �c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/fake_open.py�__init__zFakeFileOpen.__init__P s � � %��� /�������� �args�kwargs�returnc � � | j |i |��S )z:Redirects calls to file() or open() to appropriate method.)�call)r"