Skip to content

Latest commit

 

History

History
82 lines (42 loc) · 1.46 KB

File metadata and controls

82 lines (42 loc) · 1.46 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > FileSystem > createWriteStream

FileSystem.createWriteStream() method

Creates a writable stream for writing to a file. Behind the scenes it uses fs.createWriteStream()<></>.

Signature:

static createWriteStream(filePath: string, options?: IFileSystemCreateWriteStreamOptions): FileSystemWriteStream;

Parameters

Parameter

Type

Description

filePath

string

The path to the file. The path may be absolute or relative.

options

IFileSystemCreateWriteStreamOptions

(Optional) Optional settings that can change the behavior.

Returns:

FileSystemWriteStream

A new writable stream for the file.

Remarks

Throws an error if the folder doesn't exist, unless IFileSystemWriteFileOptionsBase.ensureFolderExists is set to true<></>.