1999-08-03 23:55:45 +00:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen from
|
|
|
|
% fsfile.tex at 21/Mar/99 23:00:52
|
|
|
|
%
|
|
|
|
|
|
|
|
\section{\class{wxFSFile}}\label{wxfsfile}
|
|
|
|
|
1999-11-01 20:36:43 +00:00
|
|
|
This class represents a single file opened by \helpref{wxFileSystem}{wxfilesystem}.
|
|
|
|
It provides more information than wxWindow's input stream
|
1999-08-03 23:55:45 +00:00
|
|
|
(stream, filename, mime type, anchor).
|
|
|
|
|
|
|
|
{\bf Note:} Any pointer returned by wxFSFile's member is valid
|
|
|
|
only as long as wxFSFile object exits. For example call to GetStream()
|
|
|
|
doesn't {\it create} the stream but only returns the pointer to it. In
|
|
|
|
other words after 10 calls to GetStream() you'll obtain ten identical
|
|
|
|
pointers.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
wxObject
|
|
|
|
|
|
|
|
\wxheading{See Also}
|
|
|
|
|
|
|
|
\helpref{wxFileSystemHandler}{wxfilesystemhandler},
|
|
|
|
\helpref{wxFileSystem}{wxfilesystem},
|
|
|
|
\helpref{Overview}{fs}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxFSFile::wxFSFile}\label{wxfsfilewxfsfile}
|
|
|
|
|
|
|
|
\func{}{wxFSFile}{\param{wxInputStream }{*stream}, \param{const wxString\& }{loc}, \param{const wxString\& }{mimetype}, \param{const wxString\& }{anchor}}
|
|
|
|
|
|
|
|
Constructor. You probably won't use it. See Notes for details.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{stream}{The input stream that will be used to access data}
|
|
|
|
|
|
|
|
\docparam{location}{The full location (aka filename) of the file}
|
|
|
|
|
|
|
|
\docparam{mimetype}{MIME type of this file. Mime type is either extension-based or HTTP Content-Type}
|
|
|
|
|
|
|
|
\docparam{anchor}{Anchor. See \helpref{GetAnchor()}{wxfsfilegetanchor} for details.}
|
|
|
|
|
|
|
|
If you aren't sure what do these params mean see description of GetXXXX()
|
|
|
|
functions.
|
|
|
|
|
|
|
|
\wxheading{Notes}
|
|
|
|
|
|
|
|
It is never used by end user but you'll need it if
|
|
|
|
you're writing own virtual FS. For example you may need something
|
|
|
|
similar to wxMemoryInputStream but because wxMemoryInputStream
|
|
|
|
doesn't free the memory when destroyed and thus passing memory stream
|
|
|
|
pointer into wxFSFile constructor would lead to memory leaks, you
|
|
|
|
can write your own class derived from wxFSFile :
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
class wxMyFSFile : public wxFSFile
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
void *m_Mem;
|
|
|
|
public:
|
|
|
|
wxMyFSFile(.....)
|
|
|
|
~wxMyFSFile() {free(m_Mem);}
|
|
|
|
// of course dtor is virtual ;-)
|
|
|
|
};
|
|
|
|
\end{verbatim}
|
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\membersection{wxFSFile::GetAnchor}\label{wxfsfilegetanchor}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\constfunc{const wxString\&}{GetAnchor}{\void}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
Returns anchor (if present). The term of {\bf anchor} can be easily
|
|
|
|
explained using few examples:
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\begin{verbatim}
|
|
|
|
index.htm#anchor /* 'anchor' is anchor */
|
|
|
|
index/wx001.htm /* NO anchor here! */
|
|
|
|
archive/main.zip#zip:index.htm#global /* 'global' */
|
|
|
|
archive/main.zip#zip:index.htm /* NO anchor here! */
|
|
|
|
\end{verbatim}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
Usually anchor is presented only if mime type is 'text/html'.
|
|
|
|
But it may have some meaning with other files
|
|
|
|
(for example myanim.avi\#200 may refer to position in animation
|
|
|
|
or reality.wrl\#MyView may refer to predefined view in VRML)
|
1999-08-03 23:55:45 +00:00
|
|
|
|
|
|
|
\membersection{wxFSFile::GetLocation}\label{wxfsfilegetlocation}
|
|
|
|
|
|
|
|
\constfunc{const wxString\&}{GetLocation}{\void}
|
|
|
|
|
|
|
|
Returns full location of the file, including path and protocol.
|
|
|
|
Examples :
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
http://www.wxwindows.org
|
|
|
|
http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/archive.zip#zip:info.txt
|
|
|
|
file:/home/vasek/index.htm
|
|
|
|
relative-file.htm
|
|
|
|
\end{verbatim}
|
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\membersection{wxFSFile::GetMimeType}\label{wxfsfilegetmimetype}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\constfunc{const wxString\&}{GetMimeType}{\void}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
Returns MIME type of the content of this file. It is either
|
|
|
|
extension-based (see wxMimeTypesManager) or extracted from
|
|
|
|
HTTP protocol Content-Type header.
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\membersection{wxFSFile::GetStream}\label{wxfsfilegetstream}
|
1999-08-03 23:55:45 +00:00
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\constfunc{wxInputStream*}{GetStream}{\void}
|
|
|
|
|
|
|
|
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 case of HTTP protocol which doesn't provide
|
|
|
|
this by default. wxHtml is using local cache to workaround
|
|
|
|
this and to speed up connection)
|
1999-08-05 22:05:15 +00:00
|
|
|
|