FileBase.length

Sets the length of the file. This can be used to truncate or extend the length of the file. If the file is extended, the new segment is not guaranteed to be initialized to zeros.

  1. long length [@property getter]
  2. long length [@property setter]
    struct FileBase
    @property
    void
    length
    (
    long len
    )

Examples

auto f = File("foobar", FileFlags.writeEmpty);
f.length = 42;
assert(f.length == 42);

Meta