gnomevfs.Handle Object representing an open file

## Synopsis

gnomevfs.Handle gnomevfs.Handle uri open_mode gnomevfs.OPEN_READ close get_file_info options gnomevfs.FILE_INFO_DEFAULT read bytes seek offset whence gnomevfs.SEEK_START tell truncate length write buffer

## Description

## Constructor

              gnomevfs.Handle
    	  uri
    	  open_modegnomevfs.OPEN_READ

uri:

  The URI to open.

open_mode:

  Or'd set of open mode flags

Returns:

  the new gnomevfs.Handle

## Methods

### gnomevfs.Handle.close

              close

Close the file associated with this handle.

### gnomevfs.Handle.get_file_info

              get_file_info
    	  optionsgnomevfs.FILE_INFO_DEFAULT

options:

  Or'd set of file info options

Returns:

  A gnomevfs.FileInfo.

Get information about the file, persuant to the options given.

### gnomevfs.Handle.read

              read
    	  bytes

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.

### gnomevfs.Handle.seek

              seek
    	  offset
    	  whencegnomevfs.SEEK_START

offset:

  The number of bytes to offset from the position specified by whence. This can be either positive or negative.

whence:

  The start position.

Set the current position for reading/writing.

### gnomevfs.Handle.tell

              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.

### gnomevfs.Handle.truncate

              truncate
    	  length

length:

  The length to truncate to.

Truncates the file to the length specified.

### gnomevfs.Handle.write

              write
    	  buffer

buffer:

  The buffer to write to the file.

Returns:

  The number of bytes written.

Write buffer to the file. The number of bytes actually written may be less than the buffer, as is provided as the return value.