wx.FSFile

Inheritance diagram for wx.FSFile:



Description

This class represents a single file opened by wx.FileSystem. It provides more information than wx.Window‘s input stream (stream, filename, mime type, anchor).

Note

Any pointer returned by a method of wx.FSFile is valid only as long as the wx.FSFile object exists. For example a call to GetStream() doesn’t create the stream but only returns the pointer to it. In other words after 10 calls to GetStream() you will obtain ten identical pointers.

Derived From

Class API

Methods

__init__(stream, loc, mimetype, anchor, modif)

Constructor. Usually not used by the user.

Parameters:


Returns:

wx.FSFile


DetachStream()
Detaches the stream from the wx.FSFile object. That is, the stream obtained with GetStream() will continue its existance after the wx.FSFile object is deleted. You will have to delete the stream yourself.

GetAnchor()

Returns anchor (if present).

Usually an anchor is presented only if the MIME type is ‘text/html’. But it may have some meaning with other files.


Returns:

string


GetLocation()

Returns full location of the file, including path and protocol.


Returns:

string


GetMimeType()

Returns the MIME type of the content of this file. It is either extension-based (see wx.MimeTypesManager) or extracted from HTTP protocol Content-Type header.


Returns:

string


GetModificationTime()

Returns time when this file was modified.


Returns:

wx.DateTime


GetStream()

Returns pointer to the stream. You can use the returned stream to directly access data. You may suppose that the stream provide Seek and GetSize functionality (even in the case of the HTTP protocol which doesn’t provide this by default.


Returns:

wx.InputStream


Properties

Anchor
See GetAnchor
Location
See GetLocation
MimeType
See GetMimeType
ModificationTime
See GetModificationTime
Stream
See GetStream