#include "wx/setup.h"
-#if (wxUSE_FS_INET || wxUSE_FS_ZIP) && wxUSE_STREAMS
+#if !wxUSE_STREAMS
+#error You cannot compile virtual file systems without wxUSE_STREAMS
+#endif
+
+#if wxUSE_HTML && !wxUSE_FILESYSTEM
+#error You cannot compile wxHTML without virtual file systems
+#endif
+
+#if wxUSE_FILESYSTEM
#include "wx/stream.h"
-#include "wx/mimetype.h"
#include "wx/url.h"
-
+#include "wx/datetime.h"
class wxFSFile;
class wxFileSystemHandler;
wxString m_Location;
wxString m_MimeType;
wxString m_Anchor;
+ wxDateTime m_Modif;
public:
- wxFSFile(wxInputStream *stream, const wxString& loc, const wxString& mimetype, const wxString& anchor)
+ wxFSFile(wxInputStream *stream, const wxString& loc,
+ const wxString& mimetype, const wxString& anchor,
+ wxDateTime modif)
{
m_Stream = stream;
m_Location = loc;
m_MimeType = mimetype; m_MimeType.MakeLower();
m_Anchor = anchor;
+ m_Modif = modif;
}
virtual ~wxFSFile()
{
// returns the original location (aka filename) of the file
const wxString& GetAnchor() const {return m_Anchor;}
+
+ wxDateTime GetModificationTime() const {return m_Modif;}
};
wxString GetMimeTypeFromExt(const wxString& location);
// Returns MIME type of the file - w/o need to open it
// (default behaviour is that it returns type based on extension)
-
- public:
- static void CleanUpStatics();
- // deletes static members (m_MimeMng). It can be called
- // as many times as you wish because m_MimeMng is created
- // on demand
-
- private:
- static wxMimeTypesManager *m_MimeMng;
- // MIME manager
- // (it's static and thus shared by all instances and derived classes)
};
// file contained in this directory
// (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
- wxString GetPath() const {return m_Path;}
+ wxString GetPath() const {return m_Path;}
wxFSFile* OpenFile(const wxString& location);
// opens given file and returns pointer to input stream.
*/
#endif
- // (wxUSE_FS_INET || wxUSE_FS_ZIP) && wxUSE_STREAMS
+ // wxUSE_FILESYSTEM
#endif
// __FILESYS_H__