wx.MemoryFSHandler

Inheritance diagram for wx.MemoryFSHandler:



Description

This wx.FileSystem handler can store arbitrary data in memory stream and make them accessible via URL. It is particularly suitable for storing bitmaps from resources or included XPM files so that they can be used with wxHTML.

Filenames are prefixed with “memory:”, e.g. “memory:myfile.html”.

Derived From

Class API

Methods

__init__()
No docstrings available for this method.

AddFile(filename, image, type)

Add file to list of files stored in memory. Stored data (bitmap, text or raw data) will be copied into private memory stream and available under name “memory:” + filename.

The type argument is one of wx.BITMAP_TYPE_XXX constants.

Parameters:

  • filename (string)
  • image (wx.Image)
  • type (long)

Note

Note that you must use a type value (aka image format) that wxWidgets can save (e.g. JPG, PNG, see wx.Image)!


AddFileWithMimeType(filename, filename, filename)

Like AddFile, but lets you explicitly specify added file’s MIME type. This version should be used whenever you know the MIME type, because it makes accessing the files faster.

This function is new since wxWidgets version 2.8.5

Parameters:

  • filename (string)
  • textdata (string)
  • mimetype (string)

See also

AddFile


RemoveFile(filename)

Remove file from memory FS and free occupied memory.

Parameters:

  • filename (string)