Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

Root Directory Of A Project

Do you need the root directory of an elixir project? The File.cwd!/0 function can help.

iex> File.cwd!
"/home/dev/code/my_app"

Keep in mind though, this will only work reliably with projects that are compiled using Mix.

source

Looking for help? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.