X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ee654e6bb28d20841d115f667239739e3ac42ef..a1c3cdc4a2c4cc2b15d7fdf60c1be228f9fbc520:/docs/latex/wx/fsfile.tex diff --git a/docs/latex/wx/fsfile.tex b/docs/latex/wx/fsfile.tex index 1da9827a32..220a616158 100644 --- a/docs/latex/wx/fsfile.tex +++ b/docs/latex/wx/fsfile.tex @@ -9,27 +9,31 @@ This class represents a single file opened by \helpref{wxFileSystem}{wxfilesyste It provides more information than wxWindow's input stream (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() +{\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() 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 +other words after 10 calls to GetStream() you will obtain ten identical pointers. \wxheading{Derived from} -wxObject +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + \wxheading{See Also} \helpref{wxFileSystemHandler}{wxfilesystemhandler}, -\helpref{wxFileSystem}{wxfilesystem}, +\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}} +\func{}{wxFSFile}{\param{wxInputStream }{*stream}, \param{const wxString\& }{loc}, \param{const wxString\& }{mimetype}, \param{const wxString\& }{anchor}, \param{wxDateTime }{modif}} Constructor. You probably won't use it. See Notes for details. @@ -43,17 +47,17 @@ Constructor. You probably won't use it. See Notes for details. \docparam{anchor}{Anchor. See \helpref{GetAnchor()}{wxfsfilegetanchor} for details.} -If you aren't sure what do these params mean see description of GetXXXX() +If you are not sure of the meaning of these params, see the description of the 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 +It is seldom used by the application programmer but you will need it if +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 pointer into wxFSFile constructor would lead to memory leaks, you -can write your own class derived from wxFSFile : +can write your own class derived from wxFSFile: \begin{verbatim} class wxMyFSFile : public wxFSFile @@ -67,6 +71,15 @@ class wxMyFSFile : public wxFSFile }; \end{verbatim} +\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. + \membersection{wxFSFile::GetAnchor}\label{wxfsfilegetanchor} \constfunc{const wxString\&}{GetAnchor}{\void} @@ -81,10 +94,10 @@ archive/main.zip#zip:index.htm#global /* 'global' */ archive/main.zip#zip:index.htm /* NO anchor here! */ \end{verbatim} -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) +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. \membersection{wxFSFile::GetLocation}\label{wxfsfilegetlocation} @@ -94,7 +107,7 @@ Returns full location of the file, including path and protocol. Examples : \begin{verbatim} -http://www.wxwindows.org +http://www.wxwidgets.org http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/archive.zip#zip:info.txt file:/home/vasek/index.htm relative-file.htm @@ -104,7 +117,7 @@ relative-file.htm \constfunc{const wxString\&}{GetMimeType}{\void} -Returns MIME type of the content of this file. It is either +Returns the MIME type of the content of this file. It is either extension-based (see wxMimeTypesManager) or extracted from HTTP protocol Content-Type header. @@ -121,7 +134,7 @@ Returns time when this file was modified. 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) +(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).