readFile

Read a whole file into a buffer.

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.

  1. ubyte[] readFile(NativePath path, ubyte[] buffer, size_t max_size)
    @safe
    ubyte[]
    readFile
    (,
    ubyte[] buffer = null
    ,
    size_t max_size = size_t.max
    )
  2. ubyte[] readFile(string path, ubyte[] buffer, size_t max_size)

Parameters

path NativePath

The path of the file to read

buffer ubyte[]

An optional buffer to use for storing the file contents

Meta