From 8b52f082f228170baa7f51d8c6f770db129dc955 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Sat, 18 Nov 2006 16:39:52 +0000 Subject: [PATCH] Document wxFS_XXXX flags for wxFileSystem::OpenFile. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 2 ++ docs/latex/wx/filesys.tex | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index b4b7bae080..84de2d95af 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -21,6 +21,8 @@ Changes in behaviour not resulting in compilation errors, please read this! instead of a char the range -128 - 127. - A sequence returned by wxFileSystem::FindFirst()/FindNext() may now be be scoped to a single instance of wxFileSystem. +- Streams returned by wxFileSystem::OpenFile are not necessarily seekable by + default. Open with flags wxFS_READ | wxFS_SEEKABLE if seeking is required. Changes in behaviour which may result in compilation errors diff --git a/docs/latex/wx/filesys.tex b/docs/latex/wx/filesys.tex index 2d38e300a5..ddca00a1a2 100644 --- a/docs/latex/wx/filesys.tex +++ b/docs/latex/wx/filesys.tex @@ -153,7 +153,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 @@ -161,6 +161,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}