- // TODO save other errors in some point where the user can inspect them later;
- // or maybe just toast them;
- // or nothing, very strange fails
+ // TODO save other errors in some point where the user can inspect them
+ // later;
+ // or maybe just toast them;
+ // or nothing, very strange fails
+ }
+
+ /**
+ * Check if the timestamp of last file modification in local is more current
+ * that the timestamp when setting observer to the file
+ *
+ * @return boolean: True if file is updated, False if not
+ */
+ private boolean isFileUpdated() {
+ Log_OC.d(TAG, "FileLastModified: " + mFileLastModified);
+ return (new File(mPath).lastModified() > mFileLastModified);