#folder #path #root #root-directory #base-dir

app_root_folder

Get the path to the app root folder

1 unstable release

Uses new Rust 2024

new 0.1.0 Apr 21, 2025

#742 in Filesystem

ISC license

6KB

App root folder


pre-commit

Allows you to get the root folder path of the app.

🤔 Why?

Why do I need this?

This can be useful when CWD (current working directory) is not enough.

And the manifest directory is different.

You can see the same thing in Python as:

  • BASE_DIR
  • ROOT_DIR

So, this can be useful, also, for projects that moving from Python (with this approach) to Rust.

This path can be used to access files from the repository, and that does not really depend on the implementation of the app.

Why do I need this library? And not implement it by myself?

Less boilerplate code. Call the function and get the result.

🛠️ Dev

Register pre-commit hooks

pre-commit install

Run pre-commit hooks

pre-commit run --all-files

Update dependencies

cargo update

Other

Maybe you will be interested in:

No runtime deps