[futurebasic] Re: [FB] Implementing Log file in FB

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2011 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Tue, 5 Apr 2011 08:41:21 -0700
On Apr 4, 2011, at 3:09 PM, Robert Purves wrote:

> _pathToLogFile$ = "/Users/rdp/Library/Logs/foo.log" // **change to suit**
> // special log file in ~/Library/Logs
> path = _pathToLogFile$
> fn FBPStr2CStr( path )
> fd = fn open( @path, O_WRONLY || O_APPEND || O_CREAT )


Nice Robert. Thanks.

I’m wondering if there is a way to avoid a hard-coded path ( in standard file manipulation with constants such as _kUserDomain etc. but possible there is another method ). Clearly, the BSD open takes a pointer to an array of char ( essentially a pointer to a C string ) to return the file descriptor. 

Brian S