On 9/19/16 8:01 PM, crimaniak wrote:

Is there situations when output of thisExePath() can be different during
runtime? If yes, what the reason?
If no, is this possible to mark it as pure in phobos?


Not in a way that D can ensure purity. Yes, it will not change. But that guarantee is not communicated via the OS functions required to call to get the information.

One thing you can do:

immutable string myPath;

shared static this()
   import std.file: thisExePath;
   myPath = thisExePath;

// now use myPath as required from pure functions.


Reply via email to