# What is the programmatic way to obtain the path to the base directory?

**URL:** <https://discourse.julialang.org/t/what-is-the-programmatic-way-to-obtain-the-path-to-the-base-directory/83687>\
**Category:** Internals & Design\
**Tags:** question, revise, filesystem\
**Created:** [July 3, 2022, 6:01am UTC](https://discourse.julialang.org/t/what-is-the-programmatic-way-to-obtain-the-path-to-the-base-directory/83687 "2022-07-03T06:01:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [July 3, 2022, 6:01am UTC](https://discourse.julialang.org/t/what-is-the-programmatic-way-to-obtain-the-path-to-the-base-directory/83687/1 "2022-07-03T06:01:54Z")

</div>

On v1.7, using a downloaded binary,

```julia
joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "base")

```

returns the path to the base directory. On v1.9, however, this has changed, and now

```julia
julia> joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "base") |> isdir
false

```

Now,

```julia
julia> joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "src", "base")
"/home/jishnu/packages/julias/julia-latest/bin/../share/julia/src/base"

```

is the new path (there is an extra “src” in the path). This [seems to have broken `Revise.jl`](https://github.com/timholy/Revise.jl/issues/691), and it is unable to track `Base` anymore. The issue, however, was that `Revise` was relying on a hack-y way to determine this path in the first place. This brings me to my question: is there a systematic way to obtain this path, one that would remain unchanged across releases?
