FileSystem.stat() file sizes not correct for large files

I wrote a quick script in Haxe to copy 100’s of large files from one disk to another and left it to run and some (long) time later I looked at the stats script wrote (using info from FileSystem.stat()) I saw these wild numbers and thought I messed something up, but it turned out I haven’t (yay!).

So, what I saw is if a file size is > 2GB FileSystem.stat().size is negative and if it is > 4GB then it (size) only contains the lower 32 bits of the file’s size.

This is true on eval, hl and neko targets, haven’t tried others.

It seems to be the result of Int being 32-bit sized on these targets.

Is this a bug? Shouldn’t size be haxe.Int64?