From 80af91bba499491caa7a6769f36da5b578dc54d6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 14 Jul 2003 19:17:35 +0000 Subject: [PATCH] Fixed wxFileSystem_URLToFileName and FileNameToURL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/filesys.i | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/wxPython/src/filesys.i b/wxPython/src/filesys.i index 69d782e325..2367cb82ce 100644 --- a/wxPython/src/filesys.i +++ b/wxPython/src/filesys.i @@ -141,13 +141,23 @@ public: static void AddHandler(wxFileSystemHandler *handler); static void CleanUpHandlers(); -// // Returns the native path for a file URL -// static wxFileName URLToFileName(const wxString& url); + // Returns the file URL for a native path + static wxString FileNameToURL(const wxString& filename); -// // Returns the file URL for a native path -// static wxString FileNameToURL(const wxFileName& filename); + // Returns the native path for a file URL + //static wxFileName URLToFileName(const wxString& url); *** See below }; + +// Returns the native path for a file URL +wxString wxFileSystem_URLToFileName(const wxString& url); +%{ + wxString wxFileSystem_URLToFileName(const wxString& url) { + wxFileName fname = wxFileSystem::URLToFileName(url); + return fname.GetFullPath(); + } +%} + //--------------------------------------------------------------------------- class wxInternetFSHandler : public wxFileSystemHandler {