{"version":"2.1.326","anchor":"fsread-supports-offset-and-length-ranges","canonical_anchor":"fsread-supports-offset-and-length-ranges","heading":"Plugin scripts can read part of a file instead of the whole thing","tier":"use","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/fsread-supports-offset-and-length-ranges","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Plugin scripts can read part of a file instead of the whole thing\n\nThe file-reading call in the plugin scripting API now takes an offset and a length, so a script can read just one section of a regular file\n\n**What**\n\nPlugins can include scripts, and those scripts read files through Claude Code's scripting file API. Until now that API could only read a whole file. It now accepts an offset (where in the file to start reading) and a length (how much to read).\n\nTwo limits apply to a partial read:\n\n- Only regular files: a partial read does not work on a pipe, a socket, a device or a directory.\n\n- A size cap: the amount read in one partial read is limited to a set number of bytes.\n\n**Why**\n\nA plugin script can look at one part of a large file without loading the whole file first.\n\n- Area: Plugins\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}