#include "wx/mimetype.h"
#include "wx/filename.h"
#include "wx/tokenzr.h"
+#include "wx/fileback.h"
//--------------------------------------------------------------------------------
-wxFSFile* wxFileSystem::OpenFile(const wxString& location)
+wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags)
{
wxString loc = MakeCorrectPath(location);
unsigned i, ln;
node = node->GetNext();
}
}
+
+ if (s && (flags & wxFS_SEEKABLE) != 0 && !s->GetStream()->IsSeekable())
+ {
+ wxBackedInputStream *stream;
+ stream = new wxBackedInputStream(s->DetachStream());
+ stream->FindLength();
+ s->SetStream(stream);
+ }
+
return (s);
}