MCPcopy Create free account
hub / github.com/vercel/vercel / readDistInfoFile

Function readDistInfoFile

packages/python-analysis/src/manifest/dist-metadata.ts:98–107  ·  view source on GitHub ↗

* Read a file from a .dist-info directory, returning undefined if not found.

(
  distInfoDir: string,
  filename: string
)

Source from the content-addressed store, hash-verified

96 * Read a file from a .dist-info directory, returning undefined if not found.
97 */
98async function readDistInfoFile(
99 distInfoDir: string,
100 filename: string
101): Promise<string | undefined> {
102 try {
103 return await readFile(join(distInfoDir, filename), 'utf-8');
104 } catch {
105 return undefined;
106 }
107}
108
109/**
110 * Scan a site-packages directory for installed distributions.

Callers 1

scanDistributionsFunction · 0.85

Calls 1

readFileFunction · 0.50

Tested by

no test coverage detected