vibe.d beta banner
get vibe.d
0.8.6

Asynchronous I/O that doesn’t get in your way, written in D

Function EventDriverFiles.truncate

Shrinks or extends a file to the specified size.

abstract void truncate (
  FileFD file,
  ulong size,
  nothrow @safe void delegate(FileFD, IOStatus, ulong) on_finish
) nothrow @safe;

Parameters

NameDescription
file Handle of the file to resize
size Desired file size in bytes
on_finish Called when the operation finishes - the size parameter is always set to zero
Authors
Copyright
License