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

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Dean Brooks
Fecha:  
A: Philip Hazel
Cc: exim-users
Asunto: 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@???