Synchronous version of writeFile. Writes content to a file at the specified path.
writeFile
The absolute path of the file to write.
The content to write (ArrayBuffer, TypedArray, or string).
Optional
Optional write options.
A VoidIOResult indicating success or failure.
VoidIOResult
writeFile for the async version.
1.1.0
// Write string contentwriteFileSync('/path/to/file.txt', 'Hello, World!');// Write binary contentwriteFileSync('/path/to/file.bin', new Uint8Array([1, 2, 3])); Copy
// Write string contentwriteFileSync('/path/to/file.txt', 'Hello, World!');// Write binary contentwriteFileSync('/path/to/file.bin', new Uint8Array([1, 2, 3]));
Synchronous version of
writeFile. Writes content to a file at the specified path.