Function solidity_dirs

Source
pub fn solidity_dirs(root: &Path) -> Vec<PathBuf>
Expand description

Returns a list of unique paths to all folders under root that contain at least one solidity file (*.sol).

§Examples

use foundry_compilers_core::utils;
let dirs = utils::solidity_dirs("./lib".as_ref());

for following layout will return ["lib/ds-token/src", "lib/ds-token/src/test", "lib/ds-token/lib/ds-math/src", ...]

lib
└── ds-token
    ├── lib
    │   ├── ds-math
    │   │   └── src/Contract.sol
    │   ├── ds-stop
    │   │   └── src/Contract.sol
    │   ├── ds-test
    │       └── src//Contract.sol
    └── src
        ├── base.sol
        ├── test
        │   ├── base.t.sol
        └── token.sol