matevfs.Handle Object representing an open file

## Synopsis

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

## Description

## Constructor

              matevfs.Handle
    	  uri
    	  open_modematevfs.OPEN_READ

uri:

  The URI to open.

open_mode:

  Or'd set of open mode flags

Returns:

  the new matevfs.Handle

## Methods

### matevfs.Handle.close

              close

Close the file associated with this handle.

### matevfs.Handle.get_file_info

              get_file_info
    	  optionsmatevfs.FILE_INFO_DEFAULT

options:

  Or'd set of file info options

Returns:

  A matevfs.FileInfo.

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

### matevfs.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.

### matevfs.Handle.seek

              seek
    	  offset
    	  whencematevfs.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.

### matevfs.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.

### matevfs.Handle.truncate

              truncate
    	  length

length:

  The length to truncate to.

Truncates the file to the length specified.

### matevfs.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.