eyelight93
Path name in Umbrella Apps
Hi, I’m having an issue with the Path.absname/1 function.
The function will return the absolute path of current umbrella app. Let’s say I have two app in an umbrella project called app1 and app2.
Path.absname(“something”) will return different result based on where I called it.
So how do I always get the result some_path/umbrella/apps/app1/something even if I called the function inside app2?
Most Liked
LostKobrakai
It does not. Application.app_dir does internally also just use :code api and those point to the files in the _build directory and not the source directory.
NobbZ
In theory it should be resolved relative to your current working dir, so I’m wondering why you get your apps in there…
Kurisu
Maybe could you try Application.app_dir/2 ?
Application.app_dir(:app1, "something") should always return some_path/umbrella/apps/app1/something even if you call it from app2.







