Skip to content

DataAdapter.write method

DataAdapter › write

Official

Write to a plaintext file. If the file exists its content will be overwritten, otherwise the file will be created.

Signature:

write(normalizedPath: string, data: string, options?: DataWriteOptions | undefined): Promise<void>

Parameters:

Parameter Type Description
normalizedPath string path to file, use {@link normalizePath} to normalize beforehand.
data string new file content
options? DataWriteOptions | undefined (Optional)

Returns: Promise<void>