Function readFile
Read a whole file into a buffer.
ubyte[] readFile
(
GenericPath!(vibe.core.path.PosixPathFormat) path,
ubyte[] buffer = null,
ulong max_size = 18446744073709551615LU
) @safe;
ubyte[] readFile
(
string path,
ubyte[] buffer = null,
ulong max_size = 18446744073709551615LU
) @safe;
If the supplied buffer is large enough, it will be used to store the contents of the file. Otherwise, a new buffer will be allocated.
Parameters
Name | Description |
---|---|
path | The path of the file to read |
buffer | An optional buffer to use for storing the file contents |