From 8e18f35c6f78663b5c7a23c5bceefd9f7f9c1090 Mon Sep 17 00:00:00 2001 From: contra Date: Wed, 3 Jun 2015 18:49:06 -0500 Subject: [PATCH] closes #50 and #51 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 185940c..8c6eb0e 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,17 @@ Returns the stream. Returns a pretty String interpretation of the File. Useful for console.log. +### contents + +The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification. + +For example: +```js +if (file.isBuffer()) { + console.log(file.contents.toString()); // logs out the string of contents +} +``` + ### path Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.