[futurebasic] Re: [FB] Status: FB's File I/O statement update ( i.e. conversion to 64-bit ) still in-progress

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2017 : Group Archive : Group : All Groups

From: Bernie <bernie.fblist@...>
Date: Thu, 2 Feb 2017 23:04:00 +0000
Mark wrote:
> 
> Am about done converting my two main programs from FSref to CFURL.    Tedious because there are a lot of file access routines, but so far, so good.   A quick question (I hope):   is there a straightforward way of extracting a filename (pascal string, hopefully) from a CFURLref?     I know how to do this for an FSref but can’t seem to find something similar for CFURLs.   This would help for handling double-clicked or drag-and-drop files.

toolbox fn CFURLCopyLastPathComponent( CFURLRef url ) = CFStringRef

then

toolbox fn CFStringGetPascalString( CFStringRef theString, pointer buffer, CFIndex bufferSize, CFStringEncoding encoding ) = Boolean

if necessary.