http://docs.paramiko.org/en/stable/api/sftp.html#paramiko.sftp_attr.SFTPAttributes shows the documenation for SFTP Attributes, now
I have executed following code in terminal
>>> import paramiko
>>> from stat import S_ISDIR
>>>
>>> client = paramiko.SSHClient()
>>> client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>>> client.connect('ipaddress', username='xxx', password='xxx', banner_timeout=60)
>>> sftp = client.open_sftp()
>>> dl= '/home/generic/'
>>> a=sftp.listdir_attr(dl)
>>> print(a)
[<SFTPAttributes: [ size=4096 uid=1000 gid=1000 mode=040775 atime=1624152009 mtime=1622179445 ]>, <SFTPAttributes: [ size=4096 uid=1000 gid=1000 mode=040775 atime=1624172765 mtime=1623920761 ]>, <SFTPAttributes: [ size=1100 uid=1000 gid=1000 mode=0100600 atime=1624121097 mtime=1624121097 ]>]
I got the SFTP attributes as explained in documentation.
But, my doubt is when I inspect each item returned above, like dir(a[0]) it has following items:
>>> dir(a[0])
['FLAG_AMTIME', 'FLAG_EXTENDED', 'FLAG_PERMISSIONS', 'FLAG_SIZE', 'FLAG_UIDGID', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_debug_str', '_flags', '_from_msg', '_pack', '_rwx', '_unpack', 'asbytes', 'attr', 'filename', 'from_stat', 'longname', 'st_atime', 'st_gid', 'st_mode', 'st_mtime', 'st_size', 'st_uid']
>>> type(a[0])
<class 'paramiko.sftp_attr.SFTPAttributes'>
>>>
Documentation passed above doesn't give hints about filename, longname, asbytes etc.
From where this attributes are added? How can I understand it from documentation itself?