MCPcopy Create free account
hub / github.com/code-forge-io/Remix-Forge / tryReadFilePath

Function tryReadFilePath

src/utils/file.ts:294–302  ·  view source on GitHub ↗
(filePath: string | vscode.Uri)

Source from the content-addressed store, hash-verified

292 * @returns Returns the file content as a string or null if the file does not exist
293 */
294export const tryReadFilePath = async (filePath: string | vscode.Uri) => {
295 const location = typeof filePath === "string" ? vscode.Uri.file(filePath) : filePath;
296 try {
297 await vscode.workspace.fs.readFile(location);
298 return location;
299 } catch (e) {
300 return null;
301 }
302};
303
304export const isTSConfigExists = async (rootDir: vscode.Uri) => {
305 try {

Callers 1

startDevToolsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected