]>
git.saurik.com Git - wxWidgets.git/blob - src/common/sckfile.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   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" 
  23 #if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE 
  26 #include "wx/wfstream.h" 
  27 #include "wx/protocol/file.h" 
  29 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
) 
  30 IMPLEMENT_PROTOCOL(wxFileProto
, wxT("file"), NULL
, false) 
  32 wxFileProto::wxFileProto() 
  35     m_error 
= wxPROTO_NOERR
; 
  38 wxFileProto::~wxFileProto() 
  42 wxInputStream 
*wxFileProto::GetInputStream(const wxString
& path
) 
  44     wxFileInputStream 
*retval 
= new wxFileInputStream(wxURI::Unescape(path
)); 
  47         m_error 
= wxPROTO_NOERR
; 
  52     m_error 
= wxPROTO_NOFILE
; 
  58 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE