BufferedDirectWriteFile.this

Constructs a new BufferedDirectWriteFile.

If a path is specified, the file is open too. A good buffer size depends mostly on the speed of the disk (memory and CPU). If the buffer is too big, you will notice that writing seems to happen in long bursts, with periods of a lot of buffer copying, and long wait periods writing to disk. If the buffer is too small, the throughput will be too small, resulting in bigger total write time.

32MiB have shown to be a decent value for a low end magnetic hard drive, according to a few tests.

  1. this(cstring path, ubyte[] buffer)
    class BufferedDirectWriteFile
    this
    (,
    ubyte[] buffer
    )
  2. this(cstring path, size_t buffer_blocks)

Parameters

path cstring

Path of the file to write to.

buffer ubyte[]

Buffer to use for writing, the length must be multiple of the BLOCK_SIZE and the memory must be aligned to the BLOCK_SIZE

Meta