1

I am writing files from my Assets folder to the device's internal memory using Assets.Open().

However, I do not want to write the file every time the application is run.

Only when the file has chanced since I last written it.

How can I view the asset's last modified date or some kind of hash so that I can rewrite the asset to file only when it has changed since the last build?

10
  • stackoverflow.com/questions/16340/… Commented Aug 3, 2020 at 22:09
  • @Kasalwe the asset folder in visual studio refers to a real local directory and editing the files in that folder updates in the assets built into the application. Commented Aug 3, 2020 at 22:47
  • @Jason I don't want to read all the bytes of all the files since that would be extremely slow. Commented Aug 3, 2020 at 22:48
  • Then you probably need to store some metadata about when the file was last updated and/or which version, and update appropriately. Or even store a version # as part of the file name. There are a lot of ways to approach it but all will require some work Commented Aug 3, 2020 at 22:52
  • @Jason I'm looking to automate it. Not manually track all the files. Otherwise I can just rewrite them. Commented Aug 3, 2020 at 23:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.