Re: [Exim] Wishlist for "stat" expansion item

Top Page
Delete this message
Reply to this message
Author: Dean Brooks
Date:  
To: Philip Hazel
CC: exim-users
Subject: Re: [Exim] Wishlist for "stat" expansion item
On Mon, Dec 16, 2002 at 08:51:50PM +0000, Philip Hazel wrote:

> > Proposed syntax would be something like:
> >     ${stat{filename}{lookup-value}}
> > where the lookup-value would be an enumerator for one of the stat() values.

>
> Noted, but I think I would prefer
>
>       ${stat:filename}

>
> where the result is a sequence of x=y values that you can process with
> extract.


Sounds good to me... I also imagine it results in a lot less coding
than the other method.

The only caveat would be that the extract will have to deal with the
possible scenario of the file not existing or not being accessible.

Would that condition cause the ${stat:} expansion to fail or to simply
return an empty string?

It may be preferrable to have empty string rather than fail, as
non-existing files may be "normal". The extract item could be
used to force a fail if the key wasn't found anyway, right?

Regards,

Dean Brooks
dean@???