Skip to content

BufferedFile.prototype

pgte edited this page Dec 30, 2010 · 3 revisions

Inherits from File.prototype. Implements a write buffer.

Options:

  • flush_interval_ms: the interval by which the flush function is called. Defaults to 1000 (1 second).

Has all the File.prototype methods plus:

buffered_file.flush (callback)

Flushes the pending writes into disk.

  • callback(error): called when flushing to disk completes. On the first argument contains an occurring error or null.