thisExePath purity

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 19 17:37:10 PDT 2016


On Tuesday, 20 September 2016 at 00:01:58 UTC, crimaniak wrote:
> Hi!
>
> 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?
>
> https://dlang.org/library/std/file/this_exe_path.html

No way to do that.
It does I/O.
However you cheat.
look for assumePure in https://dlang.org/phobos/std_traits.html
and then you can create a wrapper for it that is fake pure.


More information about the Digitalmars-d-learn mailing list