Is-a-stack test
FlexibleLearning at aol.com
FlexibleLearning at aol.com
Mon Sep 29 05:02:01 EDT 2003
>The test is needed to establish if a file is mc/rr as opposed to other file
>formats before opening it. Looks like the detailedFiles is the answer.
My thanks to RG at 4W via K at ST... A function that returns the Mac fileType of a file using the detailedFiles information:
function fwMacFileType pPath
local tSaveDir, tShortFileName, tFileList, tLine, tType
put the directory into tSaveDir
set the itemdel to "/"
put the last item of pPath into tShortFileName
delete last item of pPath
set the directory to pPath
put the detailed files into tFileList
put lineoffset(cr&urlEncode(tShortFileName)&comma, cr&tFileList&comma)into tLine
if tLine > 0 then
set the itemdel to comma
put last item of line tLine of tFileList into tType
end if
set the directory to tSaveDir
return tType
end fwMacFileType
For MC, the type&creator is "MCRDMSTK", and for Rev it's "REVORSTK"
Very neat.
/H
_________________________________________________
Hugh Senior
The Flexible Learning Company
Consultant Programming & Software Solutions
Fax/Voice: +44 (0)1483.27 87 27
Email: mailto:h at flexibleLearning.com
Web: www.flexibleLearning.com
More information about the metacard
mailing list