1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: ZIP file system
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
15 #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
17 #include "wx/filesys.h"
18 #include "wx/hashmap.h"
21 WX_DECLARE_STRING_HASH_MAP(int, wxZipFilenameHashMap
);
24 //---------------------------------------------------------------------------
26 //---------------------------------------------------------------------------
28 class WXDLLIMPEXP_BASE wxZipFSHandler
: public wxFileSystemHandler
32 virtual bool CanOpen(const wxString
& location
);
33 virtual wxFSFile
* OpenFile(wxFileSystem
& fs
, const wxString
& location
);
34 virtual wxString
FindFirst(const wxString
& spec
, int flags
= 0);
35 virtual wxString
FindNext();
40 // these vars are used by FindFirst/Next:
41 class wxZipInputStream
*m_Archive
;
42 wxString m_Pattern
, m_BaseDir
, m_ZipFile
;
43 bool m_AllowDirs
, m_AllowFiles
;
44 wxZipFilenameHashMap
*m_DirsFound
;
48 DECLARE_NO_COPY_CLASS(wxZipFSHandler
)
53 // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
55 #endif // _WX_FS_ZIP_H_