IOManager.readFileToBuffer

*

class IOManager
static
bool
readFileToBuffer
(
string filePath
,
ref char[] buffer
,
string mode = "r"
)
in (mode == "r" || mode == "rb")

Examples

*

char[] buf;

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

assert(
  buf == "Hello,\r\nDear engine!" ||
  buf == "Hello,\nDear engine!", 
  "Buffer does not containt the same data as file"
);

Meta