MCPcopy Index your code
hub / github.com/angular/angular-cli / isDirectory

Function isDirectory

packages/angular/cli/src/package-managers/discovery.ts:72–78  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

70 * @returns A promise that resolves to true if the path is a directory, false otherwise.
71 */
72async 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.

Callers 1

discoverFunction · 0.70

Calls 2

isDirectoryMethod · 0.65
statMethod · 0.65

Tested by

no test coverage detected