writeBytes


Description:

public static bool writeBytes (Path path, uint8[] data)

Writes a byte array to a file, replacing any existing content.

Example:

    var path = new Path ("/tmp/data.bin");
uint8[] data = { 0x48, 0x65, 0x6C, 0x6C, 0x6F };
bool ok = Files.writeBytes (path, data);

Parameters:

path

path to the file.

data

the byte array to write.

Returns:

true if write succeeded, false otherwise.