extension-based (see wxMimeTypesManager) or extracted from
HTTP protocol Content-Type header.
+\membersection{wxFSFile::GetModificationTime}\label{wxfsfilegetmodificationtime}
+
+\constfunc{wxDateTime}{GetModificationTime}{\void}
+
+Returns time when this file was modified.
+
\membersection{wxFSFile::GetStream}\label{wxfsfilegetstream}
\constfunc{wxInputStream*}{GetStream}{\void}
#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;}
};
return new wxFSFile(new wxFileInputStream(right),
right,
GetMimeTypeFromExt(location),
- GetAnchor(location));
+ GetAnchor(location),
+ wxDateTime(wxFileModificationTime(right)));
else return (wxFSFile*) NULL;
}
return new wxFSFile(s,
right,
info->GetMime(),
- GetAnchor(location));
+ GetAnchor(location),
+ wxDateTime::Today());
}
else return (wxFSFile*) NULL;
}
return new wxFSFile(s,
left + wxT("#zip:") + right,
GetMimeTypeFromExt(location),
- GetAnchor(location));
+ GetAnchor(location),
+ wxDateTime(wxFileModificationTime(left)));
}
else return NULL;
}