diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-02-21 19:15:36 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-02-21 19:15:36 -0800 |
commit | 9ae62eb47a4f7a20eae90a7296ce0a8ecb4923b9 (patch) | |
tree | 0292f4f40813b120ebeb953f51da239b559aee85 /paramiko/sftp_attr.py | |
parent | 6d9b28c56c81c2d4eb7452f0d986e4e4ec6c3039 (diff) | |
download | paramiko-9ae62eb47a4f7a20eae90a7296ce0a8ecb4923b9.tar.gz |
Wow there's a lot of SFTP crap.
Diffstat (limited to 'paramiko/sftp_attr.py')
-rw-r--r-- | paramiko/sftp_attr.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index b8040399..9b30829c 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -28,12 +28,13 @@ class SFTPAttributes (object): client or server mode. It attemps 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 + + - ``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 @@ -61,10 +62,10 @@ class SFTPAttributes (object): def from_stat(cls, obj, filename=None): """ - Create an SFTPAttributes object from an existing ``stat`` object (an - object returned by ``os.stat``). + Create an `.SFTPAttributes` object from an existing ``stat`` object (an + object returned by `os.stat`). - :param obj: an object returned by ``os.stat`` (or equivalent). + :param obj: an object returned by `os.stat` (or equivalent). :type obj: object :param filename: the filename associated with this file. :type filename: str |