Current file (module) path

Modules aren’t run, they are loaded.

If you process those files at compile time and do not use that path at runtime anymore, everything should be fine, but when you use the path during runtime and move the application to another computer or another path, without recompiling (eg. a distillery release) it will fail, because all pathes __ENV__.file is only valid during compilation.

If you want to integrate files into your release and load/process them at runtime use priv/-folder as briefly explained in another post:

4 Likes