[futurebasic] [Fwd: Re: [FB] FSSpecs vs FSRefs]

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

From: andy@...
Date: Sun, 27 Jan 2008 21:45:18 -0000 (UTC)
Sorry, finger trouble on last email: this is what I intended to post!


> On Jan 26, 2008, at 3:01 AM, andy@... wrote:
>> Hi Brian / Robert,
>> I am finding it hard to track down the documentation on FSRefs
> Tons. The FileManager section of XCode docs or Apple Developer web
> site. What is it specifically you need to know?

How FSRefs are applied and used in FB...

>> . Is any written?
> Do you mean FBtoC documentation? There is one example in FBtoC's
> Examples==>Files

Thanks. I had missed that.

> FBtoC documents any differences from FB. Other than that it uses
> FSRefs the same way Apple defines them. There is nothing extra added
> or removed.

ok. I can't actually find the references in the Apple documentation. A url
would be useful.

>> I know about VolRefs (and FSSpec) but they are both deprecated and
>> I would
>> like to take your advice and jump straight to FSRef
> For the most part, FSRefs are used just like FSSpecs but you have to
> pick the right call to make when using an FSRef.

I see. So there is not a one to one translation...

>> Locate application volume

I presume I cannot use SYSTEM(_Aplvol) - what is the alternative?

>> Goto Sub folder

Folder has gone - what is the alternative?

>> Let user select folder
>> Open file for Read
>> Read file
>> Open file for Write
>> Write file
> Read file, Write file are not concerned with how the file was opened
> (i.e. with a FSSpec or a FSRef) so their syntax for use with FSRefs
> does not change. All they do is read or write. The choice of FSRef
> vs. FSSpec comes when the file is OPENed (see the Language
> Enhancement section of FBtoC help). Open file for read or write is
> also documented in the Language Enhancement section of FBtoC docs.
> "Let user select folder". This is just a matter of picking the FSRef
> version of a call when call Navigation Services. If you are asking
> about the corresponding FSRef support in files$ for _FSSpecFolder, it
> doesn't exist yet (AFAIK). Somebody will have to write it or you will
> have to cal Nav Services directly (which is what files$ does)

Ok, thanks Brian, useful information - it should be saved somewhere so
newbies can access this.