Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides stream-like access to the raw byte content of a file.

Hierarchy

  • FileStream

Index

Constructors

constructor

Properties

fileName

fileName: string

Full, canonical SphereFS path of the open file.

fileSize

fileSize: number

Current physical size of the open file, in bytes.

position

position: number

Position of the next byte in the file to be read or written, starting at 0.

Methods

asyncRead

  • asyncRead(numBytes: number): Promise<ArrayBuffer>

asyncWrite

  • asyncWrite(data: ArrayBuffer | ArrayBufferView): Promise<void>
  • Parameters

    • data: ArrayBuffer | ArrayBufferView

    Returns Promise<void>

dispose

  • dispose(): void
  • Clean up any resources held by this FileStream after using it.

    Returns void

read

  • read(size: number): ArrayBuffer

write

  • write(data: ArrayBuffer | ArrayBufferView): void

Static open

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc