I take the png file stored in app bundle of my iOS app and process it. After that I save it in document directory. I need to reprocess the same file and replace it with the previous one if the file has any change when I push my next update to appStore. Basically I need a versioning of file to know whether any change has happened on every app updates.
I tried comparing the time created of the file using the struct stat st_ctime. But it returns the time when the app is installed on the device. Also taking the st_size doesn't seems to be a smart move.
I am using c++ to develop my app and uses cocos2dx framework.
Could anyone help me on this?
The files in app bundle are readonly, so you have the original version. And if you want to know if it is edited the copy in documents directory you can just compare them.
You can compare the data, checksum or last modification date.
How to get last modification date: