2 % automatically generated by HelpGen from
3 % fsfile.tex at 21/Mar/99 23:00:52
7 \section{\class{wxFSFile
}}\label{wxfsfile
}
9 This class represents single file opened by
\helpref{wxFileSystem
}{wxfilesystem
}.
10 It provides more information than wx's input stream
11 (stream, filename, mime type, anchor).
13 {\bf Note:
} Any pointer returned by wxFSFile's member is valid
14 only as long as wxFSFile object exits. For example call to GetStream()
15 doesn't
{\it create
} the stream but only returns the pointer to it. In
16 other words after
10 calls to GetStream() you'll obtain ten identical
19 \wxheading{Derived from
}
25 \helpref{wxFileSystemHandler
}{wxfilesystemhandler
},
26 \helpref{wxFileSystem
}{wxfilesystem
},
27 \helpref{Overview
}{fs
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxFSFile::wxFSFile
}\label{wxfsfilewxfsfile
}
33 \func{}{wxFSFile
}{\param{wxInputStream
}{*stream
},
\param{const wxString\&
}{loc
},
\param{const wxString\&
}{mimetype
},
\param{const wxString\&
}{anchor
}}
35 Constructor. You probably won't use it. See Notes for details.
37 \wxheading{Parameters
}
39 \docparam{stream
}{The input stream that will be used to access data
}
41 \docparam{location
}{The full location (aka filename) of the file
}
43 \docparam{mimetype
}{MIME type of this file. Mime type is either extension-based or HTTP Content-Type
}
45 \docparam{anchor
}{Anchor. See
\helpref{GetAnchor()
}{wxfsfilegetanchor
} for details.
}
47 If you aren't sure what do these params mean see description of GetXXXX()
52 It is never used by end user but you'll need it if
53 you're writing own virtual FS. For example you may need something
54 similar to wxMemoryInputStream but because wxMemoryInputStream
55 doesn't free the memory when destroyed and thus passing memory stream
56 pointer into wxFSFile constructor would lead to memory leaks, you
57 can write your own class derived from wxFSFile :
60 class wxMyFSFile : public wxFSFile
66 ~wxMyFSFile()
{free(m_Mem);
}
67 // of course dtor is virtual ;-)
71 \membersection{wxFSFile::GetStream
}\label{wxfsfilegetstream
}
73 \constfunc{wxInputStream*
}{GetStream
}{\void}
75 Returns pointer to the stream. You can use the returned
76 stream to directly access data. You may suppose
77 that the stream provide Seek and GetSize functionality
78 (even in case of HTTP protocol which doesn't provide
79 this by default. wxHtml is using local cache to workaround
80 this and to speed up connection)
82 \membersection{wxFSFile::GetMimeType
}\label{wxfsfilegetmimetype
}
84 \constfunc{const wxString\&
}{GetMimeType
}{\void}
86 Returns MIME type of the content of this file. It is either
87 extension-based (see wxMimeTypesManager) or extracted from
88 HTTP protocol Content-Type header.
90 \membersection{wxFSFile::GetLocation
}\label{wxfsfilegetlocation
}
92 \constfunc{const wxString\&
}{GetLocation
}{\void}
94 Returns full location of the file, including path and protocol.
98 http://www.wxwindows.org
99 http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/archive.zip#zip:info.txt
100 file:/home/vasek/index.htm
105 \membersection{wxFSFile::GetAnchor
}\label{wxfsfilegetanchor
}
107 \constfunc{const wxString\&
}{GetAnchor
}{\void}
109 Returns anchor (if present). The term of
{\bf anchor
} can be easily
110 explained using few examples:
113 index.htm#anchor /* 'anchor' is anchor */
114 index/wx001.htm /* NO anchor here! */
115 archive/main.zip#zip:index.htm#global /* 'global' */
116 archive/main.zip#zip:index.htm /* NO anchor here! */
119 Usually anchor is presented only if mime type is 'text/html'.
120 But it may have some meaning with other files
121 (for example myanim.avi\
#200 may refer to position in animation
122 or reality.wrl\#MyView may refer to predefined view in VRML)