Constant file_truncate

← Back to Module fileio



Module fileio → file_truncate

Description

File mode: Truncate. When the file is opened, the old contents are immediately removed. This mode should be combined with file_write. For example: file_write + file_truncate

const file_truncate = 0x20


Usage Example

import fileio
 
f = file("data.txt", file_write + file_truncate)
f.writeln("Hello!")
f.close()