Search the documentation
4 pages for fs.read.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
files
Claude Developer Platform · in the page
build-with-claude/files
…new Anthropic(); // Read the text file const textContent = await fs.readFile("document.txt", "utf-8"); const response = await client.messages.create({ model: "claude-opus-5-5", max_tok…
typescript
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/typescript
…) * a `fetch` `Response` (or an object with the same structure) * an `fs.ReadStream` * the return value of the `toFile` helper Set the content-type explicitly as the files API will not infer it for y…
Customize your status line
Claude Code CLI · in the page
statusline
…'||'); } } const [branch, staged, modified] = fs.readFileSync(CACHE_FILE, 'utf8').trim().split('|'); if (branch) { console.log(`[${model}] 📁 ${dir} | 🌿 ${branc…
Build an MCP App
Model Context Protocol · in the page
extensions/apps/build
…imeType: RESOURCE_MIME_TYPE }, async () => { const html = await fs.readFile( path.join(import.meta.dirname, "dist", "mcp-app.html"), "utf-8", ); return { contents: […