Hi Hugh,

I need a robust alternative to "if there is a stack pFilePath" that does *not* load the file into memory and potentially cause problems with shared stack
name space.

Can anyone improve or see  anything not foolproof with this?

function isAstack  pFilePath
return line 1 of  url("file:"&pFilePath)="#!/bin/sh"
end isAstack

In the latest fileformat 2.7x, the first 8 bytes of a valid stackfile are:

REVO2700

So I would use a combination of checking the suffix and reading/ checking the first
lines/chars of the actual stackfile.

/H

Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

_______________________________________________
metacard mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to