X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b8b37cedd39bae3a3653003a7f8ae5fecf4df78f..066f3611df971be93b2ec46b82c2f05f3ff9a422:/docs/latex/wx/filesys.tex diff --git a/docs/latex/wx/filesys.tex b/docs/latex/wx/filesys.tex index 5f28f6f092..cc590f5d52 100644 --- a/docs/latex/wx/filesys.tex +++ b/docs/latex/wx/filesys.tex @@ -18,6 +18,10 @@ provide access to user-defined virtual file systems. +\wxheading{Library} + +\helpref{wxBase}{librarieslist} + \wxheading{See Also} \helpref{wxFileSystemHandler}{wxfilesystemhandler}, @@ -38,8 +42,10 @@ Constructor. \func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}} -This static function adds new handler into the list of handlers. -The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS. +This static function adds new handler into the list of +\helpref{handlers}{wxfilesystemhandler} which provide access to virtual FS. +Note that if two handlers for the same protocol are added, the last one added +takes precedence. \wxheading{Note} @@ -116,7 +122,7 @@ Converts filename into URL. \membersection{wxFileSystem::FindFileInPath}\label{wxfilesystemfindfileinpath} -\func{bool}{FindFileInPath}{\param{wxString }{*str}, \param{const wxChar }{*path}, \param{const wxChar }{*file}} +\func{bool}{FindFileInPath}{\param{wxString }{*str}, \param{const wxString\& }{path}, \param{const wxString\& }{file}} Looks for the file with the given name \arg{file} in a colon or semi-colon (depending on the current platform) separated list of directories in @@ -151,7 +157,7 @@ Returns the next filename that matches parameters passed to \helpref{FindFirst}{ \membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile} -\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}} +\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}, \param{int }{flags = wxFS\_READ}} Opens the file and returns a pointer to a \helpref{wxFSFile}{wxfsfile} object or NULL if failed. It first tries to open the file in relative scope @@ -159,6 +165,22 @@ or NULL if failed. It first tries to open the file in relative scope absolute path. Note that the user is responsible for deleting the returned wxFSFile. +{\it flags} can be one or more of the following bit values ored together: + +\begin{verbatim} +// Open Bit Flags +enum { + wxFS_READ = 1, // Open for reading + wxFS_SEEKABLE = 4 // Returned stream will be seekable +}; +\end{verbatim} + +A stream opened with just the default {\it wxFS\_READ} flag may +or may not be seekable depending on the underlying source. +Passing {\it wxFS\_READ | wxFS\_SEEKABLE} for {\it flags} will +back a stream that is not natively seekable with memory or a file +and return a stream that is always seekable. + \membersection{wxFileSystem::URLToFileName}\label{wxfilesystemurltofilename}