Reputation: 33
I want to know if there is a way to check if a file has been edited. I looked for methods that can make it for me on Google Apps library, but I have found nothing about it. I don't know if I searched wrong.
Basically, I need to take a file, take a measurable data (something like size) of this file and store on a variable. Then, I need to take that measurable data again, store on another variable, and compare if there was a change. I need a boolean return.
Anyone?
Upvotes: 2
Views: 1251
Reputation: 5795
You could do the following (pseudo with links to documentation):
File.getID()
File.getLastUpdated()
File.getFileById()
!=
, or do more complex comparisons on the Date
s if you want.true
or false
.Google's documentation is great, for all their services. You just need to read it a bit to understand what kind of power you have through scripting. Hopefully my pseudo-method helps in solving your problem!
Upvotes: 4
Reputation: 19835
Look at the file update date: https://developers.google.com/apps-script/reference/drive/file#getLastUpdated() and for storing data look up the storing data section in the apps script help page.
Upvotes: 0