Synchronous version of createFile. Creates a new empty file at the specified path.
createFile
The absolute path of the file to create.
A VoidIOResult indicating success or failure.
VoidIOResult
createFile for the async version.
1.7.0
createFileSync('/path/to/file.txt') .inspect(() => console.log('File created')); Copy
createFileSync('/path/to/file.txt') .inspect(() => console.log('File created'));
Synchronous version of
createFile. Creates a new empty file at the specified path.