truncate method
void
truncate()
Truncates a file by setting its length to zero.
e.g.
'/tmp/log'.truncate()
'/tmp/log'.append('Start of Log')
Implementation
void truncate() {
withOpenFile(this, (file) {
file.truncate();
});
}