Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dir: Add executablePath and workingDirectory #252

Open
bryphe opened this issue May 7, 2020 · 0 comments
Open

Dir: Add executablePath and workingDirectory #252

bryphe opened this issue May 7, 2020 · 0 comments

Comments

@bryphe
Copy link
Contributor

bryphe commented May 7, 2020

In discussing the Fp.absolute* family of APIs in #251, we were discussing how hopefully users don't have to call these explicitly too often!

There are two more paths that would be useful to include in Dir that would commonly be used:

  • Dir.executablePath(): unit => Fp.t(absolute) - the absolute path to the running executable. Probably want an option to explicitly say if symlinks should be resolved or not. Having a nice API for this could really streamline the various corner cases we need to handle in Revery, today: https://github.com/revery-ui/revery/blob/4173462fc4b53fc70761f35babf1a8b9767c5b4c/src/Core/Environment.re#L59

  • Dir.workingDirectory(): unit => Fp.t(absolute) - the absolute path to the current working directory - a thin wrapper over Sys.getcwd() + Fp.absolute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant