To truncate, you have to either read in only the part you're interested in and write it back out or read in the whole file and only write out the part you're interested in.
From ifByteArray:
ReadFile(path as String, start_index as Integer, length as Integer) As Boolean
WriteFile(path as String, start_index as Integer, length as Integer) As Boolean
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.