The path to the file where the stream will write.
Optional
options: { Optional configuration options for the file stream.
Optional
flushOptional
minThe minimum buffer size before writing to the file.
Optional
mkWhether to create directories if they don't exist.
Optional
sync?: booleanWhether to synchronize writes to the file.
The key of the singleton object for the opened stream.
Opens a file stream and stores it in a singleton for shared access. Creates the necessary directories and the file if they do not exist.
Throws
Thrown if the environment is not a Node.js server.
Throws
Thrown if a file stream for the given file path is already open.
Throws
Thrown if any unexpected error occurs during the opening of the file stream.