common_roots
Return a tuple of common roots that are shared between the given paths. File system watchers operate on directories and aren't cheap to create. Try to find the minimum set of directories to watch that encompass all of the files that need to be watched.
def common_roots(
paths: Iterable[Path]
) - > tuple
Return a tuple of common roots that are shared between the given paths. File system watchers operate on directories and aren't cheap to create. Try to find the minimum set of directories to watch that encompass all of the files that need to be watched.
Parameters
| Name | Type | Description |
|---|---|---|
| paths | Iterable[Path] | A collection of Path objects for which to find the most specific common parent directories. |
Returns
| Type | Description |
|---|---|
tuple | A tuple of Path objects representing the minimal set of parent directories covering all input paths. |