Skip to content

Instantly share code, notes, and snippets.

@cristian495
Created February 4, 2022 20:49
Show Gist options
  • Save cristian495/20b1d3a93af66aaf54471698c571a6a9 to your computer and use it in GitHub Desktop.
Save cristian495/20b1d3a93af66aaf54471698c571a6a9 to your computer and use it in GitHub Desktop.
const dir = "/folderpath";
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
fs.writeFileSync(
`notes/A.txt`,
Buffer.from("sometextabcdef")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment