foundry_config::utils

Function foundry_toml_dirs

Source
pub fn foundry_toml_dirs(root: impl AsRef<Path>) -> Vec<PathBuf>
Expand description

Returns a list of unique paths to all folders under root that contain a foundry.toml file

This will also resolve symlinks

§Example

use foundry_config::utils;
let dirs = utils::foundry_toml_dirs("./lib");

for following layout this will return ["lib/dep1", "lib/dep2"]

lib
└── dep1
│   ├── foundry.toml
└── dep2
    ├── foundry.toml