On Friday, 27 December 2013 at 15:23:37 UTC, Marco Leise wrote:
No, but if you just want the path where your sources are you
could use __FILE__ for any module and cut off the part of
it that belongs to the module path. A lot of Phobos works at
compile time, so you might be able to write a one-liner for
that.

I need the absolute path __FILE__ during compile time,
so far the only way I know to get absolute paths is by using std.path.absolutePath (which uses getcwd() as its base) and getcwd() itself (which doesn't seem to work during compile time).

Is there any alternative on how to get the absolute path for a file during compile time besides using these functions?

Reply via email to