title: How do I interact with this <File> object in a node.js stream?
body: <p>I'm using gulp to build a stream of glob-matched files and move them all, in their nested structure, to a new location. To do this, I first wanted to build a simple 'through' stream to see what I get passed if I pipe to it from gulp.src().</p>
  
  <p>Here is my test gulpfile.js:</p>
  
  <pre><code>var through = require("through");
  var fs = require("fs");
  
  function write(file) {
    console.log(file);
    console.log(file.toString());
  }
  
  gulp.task("move", function () {
  
    return gulp.src("./**")
      .pipe(through(write));
  
  });
  </code></pre>
  
  <p>If I run the gulp 'move' task on the command line, I get output like the following:</p>
  
  <pre><code>&lt;File "some/path"&gt;
  [object Object]
  &lt;File "some/path/file.js" &lt;Buffer 2f 2a 0a 0a 4f 72 67 69 6e 61 6c 20 53 74 79 6c 65 20 66 72 6f 6d 20 65 74 68 61 6e 73 63 68 6f 6f 6e 6f 76 65 72 2e 63 6f 6d 2f 73 6f 6c 61 72 69 7a 65 ...&gt;&gt;
  [object Object]
  </code></pre>
  
  <p>What are those  objects? How can I interact with them?</p>