From c53e9d913b33be45208a2e1963b5850f84ca907e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 9 Jul 2020 16:10:41 +0200 Subject: [PATCH] Removing unused file-related functions This should be done back in 5ba67c67e4 (Remove wxOSX/Carbon support., 2016-01-22). --- src/common/filefn.cpp | 70 ------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index ce25de9ebc..2b92484386 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -805,76 +805,6 @@ CFURLRef wxOSXCreateURLFromFileSystemPath( const wxString& path) return CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false); } -#ifndef __WXOSX_IPHONE__ - -wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent ) -{ - CFURLRef fullURLRef; - fullURLRef = CFURLCreateFromFSRef(NULL, fsRef); - if ( fullURLRef == NULL) - return wxEmptyString; - - if ( additionalPathComponent ) - { - CFURLRef parentURLRef = fullURLRef ; - fullURLRef = CFURLCreateCopyAppendingPathComponent(NULL, parentURLRef, - additionalPathComponent,false); - CFRelease( parentURLRef ) ; - } - wxCFStringRef cfString( CFURLCopyFileSystemPath(fullURLRef, kCFURLPOSIXPathStyle )); - CFRelease( fullURLRef ) ; - - return wxCFStringRef::AsStringWithNormalizationFormC(cfString); -} - -OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ) -{ - OSStatus err = noErr ; - wxCFRef url(wxOSXCreateURLFromFileSystemPath(path)); - if ( NULL != url ) - { - if ( CFURLGetFSRef(url, fsRef) == false ) - err = fnfErr ; - } - else - { - err = fnfErr ; - } - return err ; -} - -wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ) -{ - wxCFStringRef cfname( CFStringCreateWithCharacters( kCFAllocatorDefault, - uniname->unicode, - uniname->length ) ); - return wxCFStringRef::AsStringWithNormalizationFormC(cfname); -} - -#ifndef __LP64__ - -wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) -{ - FSRef fsRef ; - if ( FSpMakeFSRef( spec , &fsRef) == noErr ) - { - return wxMacFSRefToPath( &fsRef ) ; - } - return wxEmptyString ; -} - -void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec ) -{ - OSStatus err = noErr; - FSRef fsRef; - wxMacPathToFSRef( path , &fsRef ); - err = FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, spec, NULL); - __Verify_noErr(err); -} -#endif - -#endif // !__WXOSX_IPHONE__ - #endif // __WXMAC__