Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReadTextFileOptions

Hierarchy

Index

Properties

Optional acceptTextOnly

acceptTextOnly: boolean

The optional acceptTextOnly parameter allows to fail this request early if the file contents are not textual.

Optional autoGuessEncoding

autoGuessEncoding: boolean

The optional guessEncoding parameter allows to guess encoding from content of the file.

Optional encoding

encoding: string

The optional encoding parameter allows to specify the desired encoding when resolving the contents of the file.

Optional Readonly etag

etag: string

The optional etag parameter allows to return early from resolving the resource if the contents on disk match the etag. This prevents accumulated reading of resources that have been read already with the same etag. It is the task of the caller to makes sure to handle this error case from the promise.

Optional Readonly length

length: number

Is an integer specifying how many bytes to read from the file. By default, all bytes will be read.

Optional limits

limits: { memory?: number; size?: number }

If provided, the size of the file will be checked against the limits.

Type declaration

  • Optional Readonly memory?: number
  • Optional Readonly size?: number

Optional Readonly position

position: number

Is an integer specifying where to begin reading from in the file. If position is undefined, data will be read from the current file position.