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.
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. |
reload(fs.Stats?: stats, Boolean?: cache)
: Manually reload and cache new stats/content for this file.- Returns a
Promise
- Returns a
stream(fs.ReadableStreamOptions?: options)
: Creates aReadable
stream of the file content.- See
> [fs.createReadStream()]
for more information on theoptions
object.
- See
- See
> [EventEmitter]
for how to subscribe and listen to the emitted events.- Event
'update'
: Emitted whenever this file'sstats
andcontent
are reloaded upon changes.
- Event