Is-a-stack test

FlexibleLearning at aol.com FlexibleLearning at aol.com
Sat Sep 27 08:25:01 EDT 2003


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030927/7c72ebf0/attachment.htm


More information about the metacard mailing list