code: private static long getLastModifiedTime(File file) {
      long fileLastModified = file.lastModified();
      // If the file is absent, we don't know if it changed (maybe was deleted),
      // so assume it has just changed.
      if (fileLastModified == 0) {
        fileLastModified = new Date().getTime();
      }
      return fileLastModified;
    }
docs: Returns the last modified timestamp of the given File.