doc: add ESM and CommonJS examples in `fs` documentation
This PR adds a handful of code examples to fs
methods where code examples were either entirely omitted or were only available for ESM. This includes code examples for both fsPromises
and fs
, trying to keep them in lockstep.
This includes a code example for a method, fs.chown
, that was added in Node.js v0.1.97 and seemingly has never had a code example. I've added ESM and CommonJS examples for both the normal fs
and fsPromises
versions of this method.