Package paramiko :: Class SFTPAttributes
[show private | hide private]
[frames | no frames]

Type SFTPAttributes

object --+
         |
        SFTPAttributes


Representation of the attributes of a file (or proxied file) for SFTP in 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: 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.
Method Summary
  __init__(self)
Create a new (empty) SFTPAttributes object.
  __repr__(self)
  __str__(self)
create a unix-style long description of the file (like ls -l)
SFTPAttributes from_stat(cls, obj, filename)
Create an SFTPAttributes object from an existing stat object (an object returned by os.stat). (Class method)
  _debug_str(self)
  _from_msg(cls, msg, filename)
(Class method)
  _pack(self, msg)
  _rwx(n, suid, sticky)
(Static method)
  _unpack(self, msg)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
int FLAG_AMTIME = 8                                                                     
long FLAG_EXTENDED = 2147483648L
int FLAG_PERMISSIONS = 4                                                                     
int FLAG_SIZE = 1                                                                     
int FLAG_UIDGID = 2                                                                     

Instance Method Details

__init__(self)
(Constructor)

Create a new (empty) SFTPAttributes object. All fields will be empty.
Overrides:
__builtin__.object.__init__

__str__(self)
(Informal representation operator)

create a unix-style long description of the file (like ls -l)
Overrides:
__builtin__.object.__str__

Class Method Details

from_stat(cls, obj, filename=None)

Create an SFTPAttributes object from an existing stat object (an object returned by os.stat).
Parameters:
obj - an object returned by os.stat (or equivalent).
           (type=object)
filename - the filename associated with this file.
           (type=str)
Returns:
new SFTPAttributes object with the same attribute fields.
           (type=SFTPAttributes)

Class Variable Details

FLAG_AMTIME

Type:
int
Value:
8                                                                     

FLAG_EXTENDED

Type:
long
Value:
2147483648L                                                            

FLAG_PERMISSIONS

Type:
int
Value:
4                                                                     

FLAG_SIZE

Type:
int
Value:
1                                                                     

FLAG_UIDGID

Type:
int
Value:
2                                                                     

Generated by Epydoc 2.1 on Sun Dec 4 11:16:47 2005 http://epydoc.sf.net