Clone this wiki locally
A virtual file format
A Record is a representation of some form of input, typically a file, whose contents are stored in an underlying buffer or stream. Records are passed between Tasks, allowing unlimited in-memory transformations before being written to their final destination. A valid Record instance must include the following properties and methods. The canonical implementation is node-record.
A string property identifying the source of a record.
The content of the record. Can be a Buffer, a Stream, or null.
String property containing an optional default encoding for Buffer-backed Records.
For usage with Buffer backed records only. Calls
toString() on the underlying buffer. If no encoding is provided, the Record's optional
encoding property will be used. If neither is available, will default to utf8 encoding.
Return true if the record contents are null.
Return true if the record contents are a Buffer.
Return true if the record contents are a Stream.
Return a clone of the record.
- If the record contents are a Buffer, it will be written to the provided stream.
- If the record contents are a Stream, pipe them to the provided stream.
- If the record contents are null, this will do nothing.
- If opt.end is true, the destination stream will not be ended.
Returns the provided stream.