Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 1.46 KB

LiveFile.md

File metadata and controls

22 lines (19 loc) · 1.46 KB

LiveFile

Below is a breakdown of the LiveFile component which is an extended EventEmitter instance for events support.

  • See > [EventEmitter] for more information on additional methods and properties available.

Live Directory Instance Properties

Property Type Description
path String The system path of this file.
etag String The unique E-Tag of this file.
stats fs.Stats The filesystem stats of this file.
cached Boolean Whether this file is cached in memory or not.
content Buffer OR stream.Readable The file content as Buffer if cached or stream.Readable otherwise.

Live Directory Instance Methods

  • reload(fs.Stats?: stats, Boolean?: cache): Manually reload and cache new stats/content for this file.
    • Returns a Promise
  • stream(fs.ReadableStreamOptions?: options): Creates a Readable stream of the file content.

Live Directory Instance Events

  • See > [EventEmitter] for how to subscribe and listen to the emitted events.
    • Event 'update': Emitted whenever this file's stats and content are reloaded upon changes.