truncate method Null safety
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();
});
}
Truncates a file by setting its length to zero.
e.g.
'/tmp/log'.truncate()
'/tmp/log'.append('Start of Log')
void truncate() {
withOpenFile(this, (file) {
file.truncate();
});
}