Skip to main content
readSync - node__fs.d.ts - Node documentation
function readSync

Usage in Deno

```typescript import { readSync } from "node:node__fs.d.ts"; ```
readSync(
fd: number,
buffer: ArrayBufferView,
offset: number,
length: number,
position: ReadPosition | null,
): number
Returns the number of `bytesRead`. For detailed information, see the documentation of the asynchronous version of this API: [read](../.././node__fs.d.ts/~/read).

Parameters

fd: number
buffer: ArrayBufferView
offset: number
length: number
optional
position: ReadPosition | null = 'null'

Return Type

number
readSync(
fd: number,
buffer: ArrayBufferView,
): number
Similar to the above `fs.readSync` function, this version takes an optional `options` object. If no `options` object is specified, it will default with the above values.

Parameters

fd: number
buffer: ArrayBufferView
optional
opts: ReadSyncOptions

Return Type

number