Skip to content

Instantly share code, notes, and snippets.

@juanandresnyc
Created October 12, 2016 21:04
Show Gist options
  • Save juanandresnyc/9e2c7aa7c235681b97ffb11378c187af to your computer and use it in GitHub Desktop.
Save juanandresnyc/9e2c7aa7c235681b97ffb11378c187af to your computer and use it in GitHub Desktop.
create invalid filename
// Uses node v6
var fs = require('fs');
var filename = Buffer.from('file_with_invalid_character\u0008.txt').toString();
fs.writeFile(filename, 'body', function(err) {
console.log('done', err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment