File: //usr/local/CyberCP/lib64/python3.10/site-packages/paramiko/__pycache__/sftp_attr.cpython-310.pyc
o
�hB � @ s: d dl Z d dlZd dlmZmZmZmZ G dd� d�ZdS )� N)� x80000000�o700�o70� xffffffffc @ s� e Zd ZdZdZdZdZdZeZ dd� Z
edd d
��Zdd� Z
edd
d��Zdd� Zdd� Zdd� Zeddd��Zdd� Zdd� ZdS )�SFTPAttributesai
Representation of the attributes of a file (or proxied file) for SFTP in
client or server mode. It attempts to mirror the object returned by
`os.stat` as closely as possible, so it may have the following fields,
with the same meanings as those returned by an `os.stat` object:
- ``st_size``
- ``st_uid``
- ``st_gid``
- ``st_mode``
- ``st_atime``
- ``st_mtime``
Because SFTP allows flags to have other arbitrary named attributes, these
are stored in a dict named ``attr``. Occasionally, the filename is also
stored, in ``filename``.
� � � � c C s4 d| _ d| _d| _d| _d| _d| _d| _i | _dS )zX
Create a new (empty) SFTPAttributes object. All fields will be empty.
r N)�_flags�st_size�st_uid�st_gid�st_mode�st_atime�st_mtime�attr��self� r �E/usr/local/CyberCP/lib/python3.10/site-packages/paramiko/sftp_attr.py�__init__1 s
zSFTPAttributes.__init__Nc C sH | � }|j |_ |j|_|j|_|j|_|j|_|j|_|dur"||_|S )a`
Create an `.SFTPAttributes` object from an existing ``stat`` object (an
object returned by `os.stat`).
:param object obj: an object returned by `os.stat` (or equivalent).
:param str filename: the filename associated with this file.
:return: new `.SFTPAttributes` object with the same attribute fields.
N)r r
r r r r �filename)�cls�objr r r r r � from_stat>