]>
git.saurik.com Git - wxWidgets.git/blob - src/common/sckfile.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/sckfile.cpp
3 // Purpose: File protocol
4 // Author: Guilhem Lavaux
8 // Copyright: (c) 1997, 1998 Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
19 #if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
25 #include "wx/wfstream.h"
26 #include "wx/protocol/file.h"
28 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
29 IMPLEMENT_PROTOCOL(wxFileProto
, wxT("file"), NULL
, false)
31 wxFileProto::wxFileProto()
34 m_error
= wxPROTO_NOERR
;
37 wxFileProto::~wxFileProto()
41 wxInputStream
*wxFileProto::GetInputStream(const wxString
& path
)
43 wxFileInputStream
*retval
= new wxFileInputStream(wxURI::Unescape(path
));
46 m_error
= wxPROTO_NOERR
;
51 m_error
= wxPROTO_NOFILE
;
57 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE