Removing unused file-related functions

This should be done back in 5ba67c67e4 (Remove wxOSX/Carbon support.,
2016-01-22).
This commit is contained in:
Stefan Csomor 2020-07-09 16:10:41 +02:00 committed by Vadim Zeitlin
parent 220dfe17ea
commit c53e9d913b

View File

@ -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<CFURLRef> 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__