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