Files
classin packageklyn.io
public class Files:
Files

Lightweight full-file I/O helpers.

Files is intended for simple whole-file operations where a stream object would only add lifecycle overhead. Use FileInputStream, FileOutputStream, FileReader or FileWriter when incremental processing is required.

import klyn.io

data as Byte[] = Byte[3]
data[0] = Byte(65)
data[1] = Byte(66)
data[2] = Byte(67)
Files.writeBytes("payload.bin", data)
Methods
Modifier and Type Member Description
public static writeBytes
writeBytes(path as String, content as Byte[]) as Void:
Writes bytes to a file, replacing existing content.
public static writeBytesWithPrefix
writeBytesWithPrefix(path as String, prefix as String, content as Byte[]) as Void:
Writes a text prefix followed by bytes to a file, replacing existing content.