[futurebasic] Re: [FB] how to get type and creator?/thank you

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2007 : Group Archive : Group : All Groups

From: luciano bernardi <lbern1ps@...>
Date: Tue, 22 May 2007 14:06:21 +0200
Dear Robert

Thank you very much for your prompt reply!

Luciano Bernardi


On 22-05-2007 14:02, Robert Purves, listrp@... wrote:

> 
> luciano bernardi wrote:
> 
>> could you please let me know
>> how is it possible to obtain the type and creator from one file?
> 
> 
> local mode
> local fn FSpGetTypeAndCreator( f as ^FSSpec, @type as ^OSType, @creat
> as ^OSType )
> '~'1
> dim as FInfo myFileInfo
> dim as OSErr err
> 
> type.0& = 0
> creat.0& = 0
> if ( f == 0 ) then err = _paramErr : exit fn
> err = fn FSpGetFInfo( #f, @myFileInfo )
> if ( err ) then exit fn
> type.0& = myFileInfo.fdType
> creat.0& = myFileInfo.fdCreator
> end fn = err
> 
> 
> dim as OSType @ type, creat
> dim as FSSpec f
> f.name = "FB_Temp"
> f.vRefNum = 0
> f.parID = 0
> fn FSpGetTypeAndCreator( f, @type, @creat )
> print mki$( type ), mki$( creat )
> stop
> 
> 
> Robert P.
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...