Is-a-stack test
Dave Cragg
dcragg at lacscentre.co.uk
Sat Sep 27 13:35:01 EDT 2003
At 8:13 am -0400 27/9/03, FlexibleLearning at aol.com wrote:
>Does anyone have a one-line test for whether a file is a mc or rr
>stack on a Mac?
>
>switch the platform
> case"Win32"
> return (char -3 to -1 of tFilePath is ".mc") or (char -4 to -1
>of tFilePath is ".rev")
> break
> case "MacOS"
> return fileType(tFilePath) is in "MSTKMCRD,whateverRRis" -- ????
> break
>end switch
>
>The only things I can think of are
>[1] a 'try/go stack' and on failure assume it isn't. Not very elegant!
>[2] if "#!/bin/sh" is in url("binfile:"&tFilePath). Again, not very
>elegant and a waste of RAM.
>
>Oh... and it needs to work with 2.4.1.
>
>Mucho thanks.
>
>/H
if there is a stack <tFilepath>
But I think this will load it into memory, which may not be what you want.
Dave
More information about the metacard
mailing list