fs: avoid circular dependency in SyncWriteStream
Previously, there was a circular dependency on the public fs module in SyncWriteStream. Moving the implementations of fs.writeSync and fs.closeSync to internal/fs allows us to avoid that circular dependency.
This is an alternative to https://github.com/nodejs/node/pull/11260.
Fixes #11257 (closed) (added by @BridgeAR)
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
fs