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

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

§Example

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

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