* Checks if a given path is a directory. * @param host A `Host` instance for interacting with the file system. * @param path The path to check. * @returns A promise that resolves to true if the path is a directory, false otherwise.
(host: Host, path: string)
| 70 | * @returns A promise that resolves to true if the path is a directory, false otherwise. |
| 71 | */ |
| 72 | async function isDirectory(host: Host, path: string): Promise<boolean> { |
| 73 | try { |
| 74 | return (await host.stat(path)).isDirectory(); |
| 75 | } catch { |
| 76 | return false; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Discovers the package manager used in a project by searching for lockfiles. |
no test coverage detected