[futurebasic] Re: [FB] CFIndexRead using FSRef

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Steve <mactech@...>
Date: Mon, 28 Jan 2008 15:21:10 -0500
On Jan 28, 2008, at 2:56 PM, Brian Stevens wrote:

> I'd like to see the code that does this. Studying the File Manager  
> (and I did need to do that to write some of the FBtoC file support)   
> made me realize Apple has been very careful not to remove  
> functionality. It might have to be done a different way. But it is  
> still there.


The code that does what ?   I obtain the g_datafolder vref by either a  
double-click from the Finder of a Company file or they select the  
folder using Nav Services,

Once I have that I used the call :

  g_item_db_folder = folder("items", g_datafolder)

then use the open statement

open "I", 1, "MyFile",, g_item_db_folder

and I can open MyFile in the items folder inside the data folder.

> plus have you reviewed FSCatalogSearch with an iterator?

I have but not fully to where I can use the partial or full name  

>  Maybe save the pointer to the array of FSRefs of 50,000 files and  
> build a binary search of the array.

I am doing this now in a record structure which includes index keys to  
the file to locate items by Item #, manufacturer, department, etc...   
and it works, but it is not as direct approach as the above.  But I  
don't use a binary search.

thanks for your time and answers

~ steve