U vù¾f ã @ sH d Z ddlZddlmZmZ ddlmZ G dd„ deƒZddlm Z dS )z7 Abstraction of an SFTP file handle (for server mode). é N)ÚSFTP_OP_UNSUPPORTEDÚSFTP_OK)ÚClosingContextManagerc @ sb e Zd ZdZddd„Zdd„ Zdd„ Zd d „ Zdd„ Zd d„ Z dd„ Z dd„ Zdd„ Zdd„ Z dS )Ú SFTPHandlea– Abstract object representing a handle to an open file (or folder) in an SFTP server implementation. Each handle has a string representation used by the client to refer to the underlying file. Server implementations can (and should) subclass SFTPHandle to implement features of a file handle, like `stat` or `chattr`. Instances of this class may be used as context managers. r c C s || _ d| _i | _d| _dS )a" Create a new file handle representing a local file being served over SFTP. If ``flags`` is passed in, it's used to determine if the file is open in append mode. :param int flags: optional flags as passed to `.SFTPServerInterface.open` N)Ú_SFTPHandle__flagsÚ_SFTPHandle__nameÚ_SFTPHandle__filesÚ_SFTPHandle__tell)ÚselfÚflags© r úE/opt/alt/python38/lib/python3.8/site-packages/paramiko/sftp_handle.pyÚ__init__( s zSFTPHandle.__init__c C s<