]>
git.saurik.com Git - wxWidgets.git/blob - src/common/sckfile.cpp
1b87a7d42123eb373234934bec28b6a971f34010
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"
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
34 IMPLEMENT_PROTOCOL(wxFileProto
, wxT("file"), NULL
, false)
36 wxFileProto::wxFileProto()
41 wxFileProto::~wxFileProto()
45 wxInputStream
*wxFileProto::GetInputStream(const wxString
& path
)
47 wxFileInputStream
*retval
= new wxFileInputStream(wxURI::Unescape(path
));
50 m_lastError
= wxPROTO_NOERR
;
54 m_lastError
= wxPROTO_NOFILE
;
60 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE