@@ -47,3 +47,105 @@ cdef class SFTPAttributes:
4747 if _attrs is NULL :
4848 raise MemoryError
4949 return SFTPAttributes.from_ptr(_attrs, sftp)
50+
51+ @property
52+ def name (self ):
53+ if self ._attrs is NULL :
54+ return
55+ cdef bytes b_name = self ._attrs.name
56+ return b_name
57+
58+ @property
59+ def longname (self ):
60+ if self ._attrs is NULL :
61+ return
62+ cdef bytes b_longname = self ._attrs.longname
63+ return b_longname
64+
65+ @property
66+ def flags (self ):
67+ return self ._attrs.flags if self ._attrs is not NULL else None
68+
69+ @property
70+ def type (self ):
71+ return self ._attrs.type if self ._attrs is not NULL else None
72+
73+ @property
74+ def size (self ):
75+ return self ._attrs.size if self ._attrs is not NULL else None
76+
77+ @property
78+ def uid (self ):
79+ return self ._attrs.uid if self ._attrs is not NULL else None
80+
81+ @property
82+ def gid (self ):
83+ return self ._attrs.gid if self ._attrs is not NULL else None
84+
85+ @property
86+ def owner (self ):
87+ if self ._attrs is NULL :
88+ return
89+ cdef bytes b_owner = self ._attrs.owner \
90+ if self ._attrs.owner is not NULL else None
91+ return b_owner
92+
93+ @property
94+ def group (self ):
95+ if self ._attrs is NULL :
96+ return
97+ cdef bytes b_group = self ._attrs.group \
98+ if self ._attrs.group is not NULL else None
99+ return b_group
100+
101+ @property
102+ def permissions (self ):
103+ return self ._attrs.permissions if self ._attrs is not NULL else None
104+
105+ @property
106+ def atime64 (self ):
107+ return self ._attrs.atime64 if self ._attrs is not NULL else None
108+
109+ @property
110+ def atime (self ):
111+ return self ._attrs.atime if self ._attrs is not NULL else None
112+
113+ @property
114+ def atime_nseconds (self ):
115+ return self ._attrs.atime_nseconds if self ._attrs is not NULL else None
116+
117+ @property
118+ def createtime (self ):
119+ return self ._attrs.createtime if self ._attrs is not NULL else None
120+
121+ @property
122+ def createtime_nseconds (self ):
123+ return self ._attrs.createtime_nseconds if self ._attrs is not NULL else None
124+
125+ @property
126+ def mtime64 (self ):
127+ return self ._attrs.mtime64 if self ._attrs is not NULL else None
128+
129+ @property
130+ def mtime (self ):
131+ return self ._attrs.mtime if self ._attrs is not NULL else None
132+
133+ @property
134+ def mtime_nseconds (self ):
135+ return self ._attrs.mtime_nseconds if self ._attrs is not NULL else None
136+
137+ # @property
138+ # def acl(self):
139+ # return self._attrs.acl if self._attrs is not NULL else None
140+
141+ @property
142+ def extended_count (self ):
143+ return self ._attrs.extended_count if self ._attrs is not NULL else None
144+
145+ # @property
146+ # def extended_type(self):
147+ # return self._attrs.extended_type if self._attrs is not NULL else None
148+
149+ # @property
150+ # def extended_data(self):
151+ # return self._attrs.extended_data if self._attrs is not NULL else None
0 commit comments