Reinhard Kotucha writes:

 > is it possible that LaTeX3 maintains a stack which holds the \input
 > files?  TeX3 provides a primitive \inputlineno but I'd like to have a
 > macro \inputfile which expands to the name of the file that is
 > currently read.
 >
 > It's quite similar to \@currenvir (and might share some code).

for 2e we decided against that because the primitive \input syntax is and was
acceptable LaTeX syntax and in that case you can't easily determine the file
name safely.

best solution would indeed be support from the underlying engine though i'm
not sure that it is a good idea to keep support for the original \TeX{} \input
snytax at all, ie i'm not sure why one would like to have both

- \input <file>         standard-version
- \inputfile{<file>}    <file> can be a Makros or has space

frank