read

fnvoid[] read(R)(R name, size_t upTo = size_t.max) if (isSomeFiniteCharInputRange!R && !isConvertibleToString!R)

Read entire contents of file name and returns it as an untyped array. If the file size is larger than upTo, only upTo bytes are _read.

Parameters

namestring or range of characters representing the file _name
upToif present, the maximum number of bytes to _read

Returns

Untyped array of bytes _read.

Throws

FileException on error.

See Also

readText for reading and validating a text file.
fnvoid[] read(R)(auto ref R name, size_t upTo = size_t.max) if (isConvertibleToString!R)

ditto