vaartis in A FUNNY LITTLE CYCLE on Nostr: > Explicitly set the file size, possibly truncating the file. > This way, the size ...
> Explicitly set the file size, possibly truncating the file.
> This way, the size will be truncated if the save file is smaller, and expanded if it's bigger.
> The documentation does not say, whether Write truncates the file if the specified size is smaller
> than the old contents, but the wording implies that it simply writes the amount of bytes told
> and doesn't do anything else. So, just to be safe, set the size by hand.
Sometimes I am impressed by myself. I really wrote this elaborate explanation, huh
> This way, the size will be truncated if the save file is smaller, and expanded if it's bigger.
> The documentation does not say, whether Write truncates the file if the specified size is smaller
> than the old contents, but the wording implies that it simply writes the amount of bytes told
> and doesn't do anything else. So, just to be safe, set the size by hand.
Sometimes I am impressed by myself. I really wrote this elaborate explanation, huh