[futurebasic] Re: [FB] FBtoC: 1a126 and system( _sysVol )

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

From: Robert Purves <listrp@...>
Date: Thu, 3 Jan 2008 11:55:14 +1300
Rich Love wrote:

> I have been using system( _sysVol ) with previous versions of FBtoC  
> and it was working when used with FSMakeFSSpec
> Guess, it was just dumb luck.
> How do I make the following work, now that System(_sysVol) does not  
> work...
> Temp% = System(_sysVol)
> err%=fn FSMakeFSSpec(Temp%,0,"MyFullPathName",TempFSSpec)
> OPEN "I",#6,@TempFSSpec

The ambiguity of MyFullPathName makes it hard to answer your question.

With a true colon-separated full path, FSMakeFSSpec ignores the first  
two arguments.
err = fn FSMakeFSSpec( 1234, 5678, "My HD:MyFolder:SomeFile", @fs )

 From Apple documentation:
OSErr FSMakeFSSpec ( FSVolumeRefNum vRefNum, SInt32 dirID,  
ConstStr255Param fileName, FSSpec *spec );
A volume specification for the volume containing the file or  
directory. This parameter can contain a volume reference number, a  
drive number, or 0 to specify the default volume.
The parent directory ID of the target object. If the directory is  
sufficiently specified in the fileName parameter, the dirID parameter  
can be set to 0. If the fileName parameter contains an empty string,  
FSMakeFSSpec creates an FSSpec structure for the directory specified  
by the dirID parameter.
A full or partial pathname. If the fileName parameter specifies a full  
pathname, FSMakeFSSpec ignores both the vRefNum and dirID parameters.  
A partial pathname might identify only the final target, or it might  
include one or more parent directory names. If fileName specifies a  
partial pathname, then vRefNum, dirID, or both must be valid.

Robert P.