def get_file_timestamp(fn):
 from frappe.utils import cint
 try:
  return str(cint(os.stat(fn).st_mtime))
 except OSError as e:
  if (e.args[0] != 2):
   raise
  else:
   return None

def get_file_timestamp ( fn ) : from frappe . utils import cint try : return str ( cint ( os . stat ( fn ) . st_mtime ) ) except OSError as e : if ( e . args [ 0 ] != 2 ) : raise else : return None
returns timestamp of the given file .