FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

DISK I/O

Use FsSpec with FB


FsSpec is the "official" data structure which identifies an item in a currently mounted volume.
I believe Apple is just cautioning people not to count on the internal structure of the FSSpec record to forever look the same as it does today. Today it looks like this (in FB-speak):

DIM RECORD fsSpec
  DIM fsVRefNum%
  DIM fsParID&
  DIM 63 fsName$
DIM END RECORD .fsSpec

But in the future it _may_ be composed of different elements. Toolbox calls which receive or return FSSpec's in today's format should still work if and when that format changes. Which means you should be pretty safe if you _only_ use Toolbox calls. But that makes it hard on us FB'ers, who are used to dissecting the (current) FSSpec record to extract the fields we need. For example, here's an easy way in FB to open a file given only its FSSpec:

PARENTID = fileSpec.fsParID&
OPEN "I", #_myID, fileSpec.fsName$,,fileSpec.fsVRefNum%

And this, of course, would not work if the FSSpec record format were to change significantly.
FB3 (hint) could get around this if the language included a variant of OPEN that dealt specifically with FSSpec records--something like this:

OPENFS "I", #_myID, fileSpec

such a statement would continue to work properly even if the internal structure of the FSSpec record were to be redefined.

Rick