lib/sync-file.js
function writeBuffer(buffer) {
  var written = fs.writeSync(this.fd, buffer, 0, buffer.length, null);
  fs.fsyncSync(this.fd);
  return written;
}
function writeBuffer(buffer) {
  var written = fs.writeSync(this.fd, buffer, 0, buffer.length, null);
  fs.fsyncSync(this.fd);
  return written;
}
Write a buffer synchronously to the file and flush to disk.