[futurebasic] Re: [FB] CFURL conversion

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

From: Bernie <bernie.fblist@...>
Date: Wed, 1 Feb 2017 20:40:47 +0000
Mark wrote:
> 
> latest but probably not last dumb CFURL question:
> 
> for me this works to create a new file in the application directory: 
> 
> fn FD_ApplicationDirectoryCreateCFURL(appFolderCFURL )
> SaveFileCFURLref = fn CFURLCreateCopyAppendingPathComponent( _kCFAllocatorDefault, appFolderCFURL,  @“some file name", _false )
> 
> but this doesn’t (creates nothing, but program doesn’t crash):
> 
> someString$ = “some file name”
> CFSaveFileName = fn CFStringCreateWithPascalString( 0, someString$, _kCFStringEncodingMacRoman )
> 
> fn FD_ApplicationDirectoryCreateCFURL(appFolderCFURL )
> SaveFileCFURL = fn CFURLCreateCopyAppendingPathComponent( _kCFAllocatorDefault, appFolderCFURL, CFSaveFileName, _false )
> 
> I need to have something like the latter, since the program creates the file name according to date, time, etc.  
> 

Works here…. after adding something like:

open "O", 1, @SaveFileCFURL
print #1," "
close 1