I developed a patch for library gomega, so now we have support read and write of modification time.
Here Manage modification time and SSL for upload file by etmatrix · Pull Request #39 · t3rm1n4l/go-mega · GitHub there is the PR.
I have some doubts on my code, this is the first time I use golang, I used C.memcpy is there a good alternative?
I must seek in file for calculate crc32 so I used os.File interface but rclone pass me a io.Reader interface.
Someone can give me some suggestions for improve it?
Attributes of file in Mega has the following struct
4 x crc32 = 16 bytes
1 byte => count of bytes of array of serialized modtime
1-8 bytes => serialized mod time
I think the first 16 bytes can be replaced with md5sum, this operation break the compatibility with other apps but with an option in configuration account we can choose if use standard crc32 or md5sum
So the check operation can use hash or modtime + size.
Thank you for your suggestions.