- writeFile(
this: V_Context,
path: PathLike | FileHandle,
data:
| Stream
| FileContents
| Iterable<string | ArrayBufferView<ArrayBufferLike>, any, any>
| AsyncIterable<string | ArrayBufferView<ArrayBufferLike>, any, any>,
_options?:
| null
| BufferEncoding
| ObjectEncodingOptions & {
flag?: OpenMode | undefined;
flush?: boolean;
mode?: Mode | undefined;
},
): Promise<void> Parameters
- this: V_Context
- path: PathLike | FileHandle
- data:
| Stream
| FileContents
| Iterable<string | ArrayBufferView<ArrayBufferLike>, any, any>
| AsyncIterable<string | ArrayBufferView<ArrayBufferLike>, any, any> Optional
_options:
| null
| BufferEncoding
| ObjectEncodingOptions & {
flag?: OpenMode | undefined;
flush?: boolean;
mode?: Mode | undefined;
}
Returns Promise<void>
Asynchronously writes data to a file, replacing the file if it already exists.
The encoding option is ignored if data is a buffer.