# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # This class provides an interface for opening files on different file systems. # # It can handle absolute and/or local filenames. # It uses a system of handlers (see {Wx::FileSystemHandler}) to provide access to user-defined virtual file systems. # # Category: Virtual File System # @see Wx::FileSystemHandler # @see Wx::FSFile # @see wxFileSystem Overview # # # # @note This class is untracked and should not be derived from nor instances extended! # @wxrb_require USE_FILESYSTEM class FileSystem < Object # Constructor. # # The initial current path of this object will be empty (i.e. {Wx::FileSystem#get_path} == {Wx::EmptyString}) which means that e.g. {Wx::FileSystem#open_file} or {Wx::FileSystem#find_first} functions will use current working directory as current path (see also {Wx::GetCwd}). # @return [Wx::FileSystem] def initialize; end # Remove a filesystem handler from the list of handlers. # @param handler [Wx::FileSystemHandler] # @return [Wx::FileSystemHandler] def self.remove_handler(handler) end # Converts a {Wx::FileName} into an URL. # # # @see Wx::FileSystem.url_to_file_name # @see Wx::FileName # @param filename [String] # @return [String] def self.file_name_to_url(filename) end # This static function returns true if there is a registered handler which can open the given location. # @param location [String] # @return [Boolean] def self.has_handler_for_path(location) end # Converts URL into a well-formed filename. # # The URL must use the file protocol. # @param url [String] # @return [String] def self.url_to_file_name(url) end end # FileSystem # Classes derived from {Wx::FileSystemHandler} are used to access virtual file systems. # # Its public interface consists of two methods: {Wx::FileSystemHandler#can_open} and {Wx::FileSystemHandler#open_file}. # It provides additional protected methods to simplify the process of opening the file: {Wx::FileSystemHandler.get_protocol}, {Wx::FileSystemHandler.get_left_location}, {Wx::FileSystemHandler.get_right_location}, {Wx::FileSystemHandler.get_anchor}, {Wx::FileSystemHandler.get_mime_type_from_ext}. # Please have a look at overview (see {Wx::FileSystem}) if you don't know how locations are constructed. # Also consult the list of available handlers. # Note that the handlers are shared by all instances of {Wx::FileSystem}. # #
{Wx::HTML} library provides handlers for local files and HTTP or FTP protocol. #
#The location parameter passed to {Wx::FileSystemHandler#open_file} or {Wx::FileSystemHandler#can_open} methods is always an absolute path. You don't need to check the FS's current path. #
#"memory:"
, e.g. "memory:myfile.html"
.
#
# Category: Virtual File System
# @see Wx::MemoryFSHandler.add_file_with_mime_type
#
#
# @wxrb_require USE_FILESYSTEM
class MemoryFSHandler < FileSystemHandler
# @overload self.add_file(filename, image, type)
# Adds a file to the list of the files stored in memory.
#
# Stored data (bitmap, text or raw data) will be copied into private memory stream and available under name "memory:"
+ filename.
# When using the overload taking {Wx::String} data, if the string contains only Latin-1 characters (which includes strings created using Wx::String#from8bit_data), its data is used as is. Otherwise, the UTF-8 representation of the string is stored as the data associated with the given filename.
#
# you must use a type value (aka image format) that wxWidgets can save (e.g. JPG, PNG, see {Wx::Image} documentation)! #
#"memory:"
+ filename.
# When using the overload taking {Wx::String} data, if the string contains only Latin-1 characters (which includes strings created using Wx::String#from8bit_data), its data is used as is. Otherwise, the UTF-8 representation of the string is stored as the data associated with the given filename.
#
# you must use a type value (aka image format) that wxWidgets can save (e.g. JPG, PNG, see {Wx::Image} documentation)! #
#"memory:"
+ filename.
# When using the overload taking {Wx::String} data, if the string contains only Latin-1 characters (which includes strings created using Wx::String#from8bit_data), its data is used as is. Otherwise, the UTF-8 representation of the string is stored as the data associated with the given filename.
#
# you must use a type value (aka image format) that wxWidgets can save (e.g. JPG, PNG, see {Wx::Image} documentation)! #
#