File.get

Convenience function to return the content of a file. Returns a slice of the provided output buffer, where that has sufficient capacity, and allocates from the heap where the file content is larger.

Content size is determined via the file-system, per File.length, although that may be misleading for some *nix systems. An alternative is to use File.load which loads content until an Eof is encountered.

class File
static
void[]
get
(
const(char)[] path
,
void[] dst = null
)

Meta