Package paramiko :: Module sftp :: Class SFTPFile
[show private | hide private]
[frames | no frames]

Type SFTPFile

  object --+    
           |    
BufferedFile --+
               |
              SFTPFile


Method Summary
  __init__(self, sftp, handle, mode, bufsize)
  close(self)
Close the file.
  seek(self, offset, whence)
Set the file's current position, like stdio's fseek.
SFTPAttributes stat(self)
Retrieve information about this file from the remote system.
    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
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

close(self)

Close the file. Future read and write operations will fail.
Overrides:
paramiko.file.BufferedFile.close (inherited documentation)

seek(self, offset, whence=0)

Set the file's current position, like stdio's fseek. Not all file objects support seeking.
Parameters:
offset - position to move to within the file, relative to whence.
           (type=int)
whence - type of movement: 0 = absolute; 1 = relative to the current position; 2 = relative to the end of the file.
           (type=int)
Raises:
IOError - if the file doesn't support random access.
Overrides:
paramiko.file.BufferedFile.seek (inherited documentation)

Note: If a file is opened in append mode ('a' or 'a+'), any seek operations will be undone at the next write (as the file position will move back to the end of the file).

stat(self)

Retrieve information about this file from the remote system. This is exactly like SFTP.stat, except that it operates on an already-open file.
Returns:
an object containing attributes about this file.
           (type=SFTPAttributes)

Generated by Epydoc 2.1 on Fri Apr 23 15:55:50 2004 http://epydoc.sf.net