# [NTG-context] \ReadFile in MkII vs MkIV

Sun Oct 17 19:58:35 CEST 2010

On Sun, 17 Oct 2010, Wolfgang Schuster wrote:

>
> Am 17.10.2010 um 19:21 schrieb Aditya Mahajan:
>
>> It works, but does not fit my need. I wanted to add an option to the filter module to allow the user to say:
>>
>> \setupexternalfilters[directory=$TEMP] >> >> and have all the tmp files created in$TEMP. Having to set this as a relative path will be really ugly.
>>
>> I am just looking for macro that takes the filename as a (brace delimited) parameter and typesets it. I can define one on my own; but I thought that \ReadFile is already supposed to do that.
>>
>> It is straight forward to "fix" \ReadFile so that absolute paths work:
>>
>>
>> I just wondering if the current behavior is a design decision or an oversight.
>
> What i get from the comments in the source is that \readfile looks for the requested file
> in the current directory, the parent directories and the tex directory and \ReadFile is
> a alternative form for \readfile without the second and third argument.

Then the MkII implementation is wrong because it allows absolute paths.

I wanted something that will work consistently in MkII and MkIV. I can do:

\doifmodeelse{\s!mkii}