writeFile(file_path, data, [mode], [overwrite])

Class: SwingUI.

Description:

Writes data to a file synchronously.

Parameters:

Name Type Default Description

file_path

string | URL

Local destination file path.

data

string | ArrayBuffer | Uint8Array | Buffer

Data to write to a file.

[mode]

string

"write"

"write" or "append"

[overwrite]

boolean

true

true to overwrite existing file with the same path. false to fail and return false if a file with the same path already exists.

Returns:

Returns true on success, or throws an Error on failure.

Type: boolean