Format: application/x-python-code
1 o
2
3 ;'h,[ � @ s� d dl mZ d dlZd dlZd dlZd dlmZmZmZm Z m
4 Z
5 d dlmZ d dl
6 mZ d dlmZ d dlmZmZmZmZmZmZmZmZ dd lmZ dd
7 lmZ ergd dlmZ d dlm Z m!Z!m"Z"m#Z# ne$ Z" Z Z!Z#G d
8 d� deee �Z%e d5d6d d!��Z&e d7d8d$d!��Z& % & ' d9d:d*d!�Z&d;d-d.�Z'ed/d0�G d1d2� d2ed3 ��Z(G d4d3� d3�Z)e�*e)� dS )<� )�annotationsN)�
9 AsyncIterator�Callable�Iterable�Iterator�Sequence)� dataclass)�partial)�PathLike)�IO�
10 TYPE_CHECKING�Any�AnyStr�ClassVar�Final�Generic�overload� )� to_thread)�
11 AsyncResource)�
12 ModuleType)�OpenBinaryMode�OpenTextMode�ReadableBuffer�WriteableBufferc @ s e Zd ZdZdEdd�ZdFdd�ZedGd
13 d��ZdHdd�ZdIdd�Z dJdKdd�Z
14 dJdLdd�ZdMdd �ZdNd"d#�Z
15 dOd&d'�ZdOd(d)�ZedPd+d,��ZedQd.d,��ZdRd0d,�ZedSd3d4��ZedTd6d4��ZdUd8d4�ZdVdWd;d<�ZejfdXd?d@�ZdYdAdB�ZdIdCdD�Zd9S )Z� AsyncFilea�
16 An asynchronous file object.
17
18 This class wraps a standard file object and provides async friendly versions of the
19 following blocking methods (where available on the original file object):
20
21 * read
22 * read1
23 * readline
24 * readlines
25 * readinto
26 * readinto1
27 * write
28 * writelines
29 * truncate
30 * seek
31 * tell
32 * flush
33
34 All other methods are directly passed through.
35
36 This class supports the asynchronous context manager protocol which closes the
37 underlying file at the end of the context block.
38
39 This class also supports asynchronous iteration::
40
41 async with await open_file(...) as f:
42 async for line in f:
43 print(line)
44 �fp�
45 IO[AnyStr]�return�Nonec C s
46 || _ d S �N��_fp)�selfr � r$ �IC:\Users\shubh\Videos\agent\nova\Lib\site-packages\anyio/_core/_fileio.py�__init__F �
47 zAsyncFile.__init__�name�str�objectc C s t | j|�S r )�getattrr"