klyn.io.Files.writeBytes
method

    public static writeBytes(path as String, content as Byte[]) as Void:

Description

Writes bytes to a file, replacing existing content.

Parameters

Parameter | Description
--- | ---
`path` | Target file path.
`content` | Bytes to write. A null value is treated as an empty byte array.

Throws

- IOException if the file cannot be opened or written.

Example

    import klyn.io

    bytes as Byte[] = Byte[1]
    bytes[0] = Byte(10)
    Files.writeBytes("one-byte.bin", bytes)