1999-08-03 19:55:45 -04:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen from
|
|
|
|
% fsfile.tex at 21/Mar/99 23:00:52
|
|
|
|
%
|
|
|
|
|
|
|
|
\section{\class{wxFSFile}}\label{wxfsfile}
|
|
|
|
|
1999-11-01 15:36:43 -05:00
|
|
|
This class represents a single file opened by \helpref{wxFileSystem}{wxfilesystem}.
|
|
|
|
It provides more information than wxWindow's input stream
|
1999-08-03 19:55:45 -04:00
|
|
|
(stream, filename, mime type, anchor).
|
|
|
|
|
2002-06-07 16:15:28 -04:00
|
|
|
{\bf Note:} Any pointer returned by a method of wxFSFile is valid
|
|
|
|
only as long as the wxFSFile object exists. For example a call to GetStream()
|
1999-08-03 19:55:45 -04:00
|
|
|
doesn't {\it create} the stream but only returns the pointer to it. In
|
2000-07-15 15:51:35 -04:00
|
|
|
other words after 10 calls to GetStream() you will obtain ten identical
|
1999-08-03 19:55:45 -04:00
|
|
|
pointers.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2000-02-27 16:06:58 -05:00
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/filesys.h>
|
1999-08-03 19:55:45 -04:00
|
|
|
|
|
|
|
\wxheading{See Also}
|
|
|
|
|
|
|
|
\helpref{wxFileSystemHandler}{wxfilesystemhandler},
|
2000-03-14 19:21:49 -05:00
|
|
|
\helpref{wxFileSystem}{wxfilesystem},
|
1999-08-03 19:55:45 -04:00
|
|
|
\helpref{Overview}{fs}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxFSFile::wxFSFile}\label{wxfsfilewxfsfile}
|
|
|
|
|
2005-02-06 12:27:04 -05:00
|
|
|
\func{}{wxFSFile}{\param{wxInputStream }{*stream}, \param{const wxString\& }{loc}, \param{const wxString\& }{mimetype}, \param{const wxString\& }{anchor}, \param{wxDateTime }{modif}}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
|
|
|
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.}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
If you are not sure of the meaning of these params, see the description of the GetXXXX()
|
1999-08-03 19:55:45 -04:00
|
|
|
functions.
|
|
|
|
|
|
|
|
\wxheading{Notes}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
It is seldom used by the application programmer but you will need it if
|
2000-03-14 19:21:49 -05:00
|
|
|
you are writing your 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 a memory stream
|
1999-08-03 19:55:45 -04:00
|
|
|
pointer into wxFSFile constructor would lead to memory leaks, you
|
2000-03-14 19:21:49 -05:00
|
|
|
can write your own class derived from wxFSFile:
|
1999-08-03 19:55:45 -04:00
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
class wxMyFSFile : public wxFSFile
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
void *m_Mem;
|
|
|
|
public:
|
|
|
|
wxMyFSFile(.....)
|
|
|
|
~wxMyFSFile() {free(m_Mem);}
|
|
|
|
// of course dtor is virtual ;-)
|
|
|
|
};
|
|
|
|
\end{verbatim}
|
|
|
|
|
2006-09-06 09:57:06 -04:00
|
|
|
\membersection{wxFSFile::DetachStream}\label{wxfsfiledetachstream}
|
|
|
|
|
|
|
|
\func{void}{DetachStream}{\void}
|
|
|
|
|
|
|
|
Detaches the stream from the wxFSFile object. That is, the
|
|
|
|
stream obtained with {\tt GetStream()} will continue its existance
|
|
|
|
after the wxFSFile object is deleted. You will have to delete
|
|
|
|
the stream yourself.
|
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxFSFile::GetAnchor}\label{wxfsfilegetanchor}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\constfunc{const wxString\&}{GetAnchor}{\void}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
Returns anchor (if present). The term of {\bf anchor} can be easily
|
|
|
|
explained using few examples:
|
1999-08-03 19:55:45 -04:00
|
|
|
|
1999-10-16 11:38:26 -04: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 19:55:45 -04:00
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
Usually an anchor is presented only if the 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 a predefined view in VRML.
|
1999-08-03 19:55:45 -04:00
|
|
|
|
|
|
|
\membersection{wxFSFile::GetLocation}\label{wxfsfilegetlocation}
|
|
|
|
|
|
|
|
\constfunc{const wxString\&}{GetLocation}{\void}
|
|
|
|
|
|
|
|
Returns full location of the file, including path and protocol.
|
|
|
|
Examples :
|
|
|
|
|
|
|
|
\begin{verbatim}
|
2004-05-04 04:27:20 -04:00
|
|
|
http://www.wxwidgets.org
|
1999-08-03 19:55:45 -04:00
|
|
|
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 11:38:26 -04:00
|
|
|
\membersection{wxFSFile::GetMimeType}\label{wxfsfilegetmimetype}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\constfunc{const wxString\&}{GetMimeType}{\void}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
Returns the MIME type of the content of this file. It is either
|
1999-10-16 11:38:26 -04:00
|
|
|
extension-based (see wxMimeTypesManager) or extracted from
|
|
|
|
HTTP protocol Content-Type header.
|
1999-08-03 19:55:45 -04:00
|
|
|
|
2000-01-18 20:00:47 -05:00
|
|
|
\membersection{wxFSFile::GetModificationTime}\label{wxfsfilegetmodificationtime}
|
|
|
|
|
|
|
|
\constfunc{wxDateTime}{GetModificationTime}{\void}
|
|
|
|
|
|
|
|
Returns time when this file was modified.
|
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxFSFile::GetStream}\label{wxfsfilegetstream}
|
1999-08-03 19:55:45 -04:00
|
|
|
|
1999-10-16 11:38:26 -04: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
|
2000-03-14 19:21:49 -05:00
|
|
|
(even in the case of the HTTP protocol which doesn't provide
|
|
|
|
this by default. wxHtml uses local cache to work around
|
|
|
|
this and to speed up the connection).
|
1999-08-05 18:05:15 -04:00
|
|
|
|