truncate_size
Description:
truncate a file to a particular size
This command truncates path to size size bytes. The file must exist already.
If the current file size is less than size then the file is extended to the required size with zero bytes. This creates a sparse
file (ie. disk blocks are not allocated for the file until you write to it). To create a non-sparse file of zeroes, use
fallocate64 instead.
Parameters:
| this |
A GuestfsSession object |
Returns:
|
true on success, false on error |