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);
| path |
path to the file. |
| data |
the byte array to write. |
|
true if write succeeded, false otherwise. |