]>
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
7 // Copyright: (c) 1997, 1998 Guilhem Lavaux
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
24 #include "wx/wfstream.h"
25 #include "wx/protocol/file.h"
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
33 IMPLEMENT_PROTOCOL(wxFileProto
, wxT("file"), NULL
, false)
35 wxFileProto::wxFileProto()
40 wxFileProto::~wxFileProto()
44 wxInputStream
*wxFileProto::GetInputStream(const wxString
& path
)
46 wxFileInputStream
*retval
= new wxFileInputStream(wxURI::Unescape(path
));
49 m_lastError
= wxPROTO_NOERR
;
53 m_lastError
= wxPROTO_NOFILE
;
59 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE