gnomevfs.Handle — Object representing an open file
class gnomevfs.Handle: |
gnomevfs.Handle(uri
, open_mode
=gnomevfs.OPEN_READ)
| The URI to open. |
| Or'd set of open mode flags |
Returns: | the new gnomevfs.Handle |
def get_file_info(options
=gnomevfs.FILE_INFO_DEFAULT)
| Or'd set of file info options |
Returns: | A gnomevfs.FileInfo. |
Get information about the file, persuant to the options given.
def read(bytes
)
| The number of bytes to read |
Returns: | A string containing the data. |
Read bytes
from file. The actual number of bytes read may be less than this, so you may need to check the length of the string returned.
def seek(offset
, whence
=gnomevfs.SEEK_START)
| The number of bytes to offset from the position specified by whence . This can be either positive or negative. |
| The start position. |
Set the current position for reading/writing.
def tell()
Returns: | A long specifying the current byte position. |
Returns the current position in the file. This is the position at which any reads or writes will begin at.