MCPcopy Index your code
hub / github.com/MetaMask/rpc-errors / getWorkspaceFile

Function getWorkspaceFile

yarn.config.cjs:51–53  ·  view source on GitHub ↗

* Get the contents of a file within the workspace. The file is expected to be * encoded as UTF-8. * * @param {Workspace} workspace - The workspace. * @param {string} path - The path to the file, relative to the workspace root. * @returns {Promise } The contents of the file.

(workspace, path)

Source from the content-addressed store, hash-verified

49 * @returns {Promise<string>} The contents of the file.
50 */
51async function getWorkspaceFile(workspace, path) {
52 return await readFile(getWorkspacePath(workspace, path), 'utf8');
53}
54
55/**
56 * Expect that the workspace has the given field, and that it is a non-null

Callers 2

expectReadmeFunction · 0.85

Calls 1

getWorkspacePathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…