[][src]Function liboskar::walk_parallel::single_threaded::is_project_dir

pub fn is_project_dir(p: &str, name: &str) -> bool

Helper function to identify project directories. The heuristic is as follows:

  1. For .stack-work, look for a .cabal file or a package.yaml file in the parent directory.
  2. For target, look for a Cargo.toml file in the parent directory.
  3. For elm-stuff, look for elm-package.json in the parent directory.
  4. For build, dist, look for a .cabal, setup.py or cabal.project file.
  5. For dist-newstyle, look for a .cabal or cabal.project file.
  6. For nimcache, look for a .nim file in the parent directory.
  7. Otherwise, if setup.py is in the parent directory and it ends with .egg-info, return true.
  8. In all other cases, return false, but still proceed into the directory to search files by extension.