Class: Wx::MemoryFSHandler
- Inherits:
-
FileSystemHandler
- Object
- Object
- FileSystemHandler
- Wx::MemoryFSHandler
- Defined in:
- lib/wx/doc/gen/file_system.rb
Overview
This FileSystem handler can store arbitrary data in memory stream and make them accessible via an URL.
It is particularly suitable for storing bitmaps from resources or included XPM files so that they can be used with HTML or WebView. Filenames are prefixed with "memory:"
, e.g. "memory:myfile.html"
.
Category: Virtual File System
Class Method Summary collapse
- .add_file(*args) ⇒ Object
-
.add_file_with_mime_type(filename, textdata, mimetype) ⇒ void
Like MemoryFSHandler.add_file, but lets you explicitly specify added file’s MIME type.
-
.remove_file(filename) ⇒ void
Removes a file from memory FS and frees the occupied memory.
Instance Method Summary collapse
-
#initialize ⇒ Wx::MemoryFSHandler
constructor
Constructor.
Methods inherited from FileSystemHandler
#can_open, #find_first, #find_next, get_mime_type_from_ext, #open_file
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::MemoryFSHandler
Constructor.
222 |
# File 'lib/wx/doc/gen/file_system.rb', line 222 def initialize; end |
Class Method Details
.self.add_file(filename, image, type) ⇒ void .self.add_file(filename, bitmap, type) ⇒ void .self.add_file(filename, textdata) ⇒ void
208 |
# File 'lib/wx/doc/gen/file_system.rb', line 208 def self.add_file(*args) end |
.add_file_with_mime_type(filename, textdata, mimetype) ⇒ void
This method returns an undefined value.
Like add_file, 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.
218 |
# File 'lib/wx/doc/gen/file_system.rb', line 218 def self.add_file_with_mime_type(filename, textdata, mimetype) end |
.remove_file(filename) ⇒ void
This method returns an undefined value.
Removes a file from memory FS and frees the occupied memory.
227 |
# File 'lib/wx/doc/gen/file_system.rb', line 227 def self.remove_file(filename) end |