$InputFileName backwards compatibility What would be a good replacement for $InputFileName (which has been added recently to Mathematica 8) to achieve backwards compatibility with let's say M6 and M7?

I am using it for loading auxiliary data from a package file and found that it is a convenient way to use relative paths for this purpose. However, I am not sure how to achieve this in M6 and M7.

For example,

$PackageDir=DirectoryName[$InputFileName];
svgParser=XMLParserInitializeXMLParser["svg",
FileNameJoin[{$PackageDir,"Cache/svg10.dtd"}]]  - 1 Answer You can try SystemPrivate$InputFileName


Seems to work on M7, not sure about M6.

-