The project root directory of a file located in PROJECT_ROOT/lib/code.jl
can be accessed with this code:
root = dirname(dirname(@__FILE__))
Using dirname()
twice seems pretty ugly. Is there a better way to do this? With Ruby, I would use this code:
root = File.expand_path('../', File.dirname(__FILE__))