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__