Say it isn't so
Richard Gaskin
ambassador at fourthworld.com
Fri Jan 31 13:14:01 EST 2003
RCS wrote:
> Do I really have to do a 'files' function, and 'walk' through all of the
> files (possibly hundreds) in the list until I find the one I am intereted in
> just to get the file 'type' and 'creator' on a Mac?
Not if you have a couple minutes to turn it into a one-liner:
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
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the metacard
mailing list