I have problem with fileIO xtra:
lets say I have a text file with:
Next I open that file (writeable)
and after close I get the same file, because xtra doesn't cut file length to new length.
How to cut file length or clear file after I open it ?
I'm not sure what you're using fileIO for, but if it's to save stateful information about your application then you can probably use getPref() and setPref(), which would be simpler and solve your issue because the info is written over completely, if you so choose, when using setPref().
When you open a file with FileIO and write a string, the write operation starts at the beginning by default. If there aren't enough characters in your string to overwrite anything that already exists then anything beyond the length of the string written isn't altered - as you observed. The solution is to delete the existing file and re-create it before writing.