code: function respondWithFile(req, res, path, ifNoFile) {
    ifNoFile = ifNoFile || function() {};
    // We use `documentRoot` as the root wherein we seek files.
    var realpath = protectedPath(req.server.documentRoot, path);
    fs.stat(realpath, function(err, stats) {
      if (err) return ifNoFile();
  
      if (stats.isDirectory()) {
        realpath = p.join(realpath, 'index.html');
      }
      res.mime(p.extname(realpath).slice(1));
  
      // Cache management (compare timestamps at second-level precision).
      var lastModified = Math.floor(stats.mtime / 1000);
      var since = req.headers['if-modified-since'];
      if (since && (lastModified <= Math.floor(new Date(since) / 1000))) {
        res.statusCode = 304; // not modified.
        res.end();
        return;
      }
      res.setHeader('Last-Modified', stats.mtime.toUTCString());
  
      // Connect the output of the file to the network!
      var raw = fs.createReadStream(realpath);
      raw.on('error', function(err) {
        log(err.stack, 'error');
        res.statusCode = 404;
        res.end('Not Found\n');
      });
      raw.pipe(res.compressed());
    });
  }
docs: End the response `res` with file at path `path`. If the file does not exist, we call `ifNoFile()`.