IOManager.writeBufferToFile

*

class IOManager
static
bool
writeBufferToFile
(
string filePath
,
ref char[] buffer
,
string mode = "w"
)
in (mode == "w" || mode == "wb")

Examples

*

char[] buf = ['H', 'E', 'L', 'L', 'O', '7', '!'];
char[] buf2;

if (!IOManager.writeBufferToFile("test_write_file.txt", buf))
  assert(0, "Operation failed at writing!");

if (!IOManager.readFileToBuffer("test_write_file.txt", buf2))
  assert(0, "Operation failed at reading!");

assert(
  buf == buf2,
  "Buffer2 does not containt the same data as Buffer1"
);

Meta