1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: ZIP file system
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma interface "fs_zip.h"
19 #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
21 #include "wx/filesys.h"
22 #include "wx/hashmap.h"
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();
39 // these vars are used by FindFirst/Next:
40 class wxZipInputStream
*m_Archive
;
41 wxString m_Pattern
, m_BaseDir
, m_ZipFile
;
42 bool m_AllowDirs
, m_AllowFiles
;
43 wxLongToLongHashMap
*m_DirsFound
;
46 void CloseArchive(class wxZipInputStream
*archive
);
48 DECLARE_NO_COPY_CLASS(wxZipFSHandler
)
53 // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
55 #endif // _WX_FS_ZIP_H_