def get_doc_files(files, start_path, force=0, sync_everything=False, verbose=False):
 document_type = [u'doctype', u'page', u'report', u'print_format', u'website_theme', u'web_form', u'email_alert']
 for doctype in document_type:
  doctype_path = os.path.join(start_path, doctype)
  if os.path.exists(doctype_path):
   for docname in os.listdir(doctype_path):
    if os.path.isdir(os.path.join(doctype_path, docname)):
     doc_path = (os.path.join(doctype_path, docname, docname) + u'.json')
     if os.path.exists(doc_path):
      if (not (doc_path in files)):
       files.append(doc_path)

def get_doc_files ( files , start_path , force = 0 , sync_everything = False , verbose = False ) : document_type = [ u'doctype' , u'page' , u'report' , u'print_format' , u'website_theme' , u'web_form' , u'email_alert' ] for doctype in document_type : doctype_path = os . path . join ( start_path , doctype ) if os . path . exists ( doctype_path ) : for docname in os . listdir ( doctype_path ) : if os . path . isdir ( os . path . join ( doctype_path , docname ) ) : doc_path = ( os . path . join ( doctype_path , docname , docname ) + u'.json' ) if os . path . exists ( doc_path ) : if ( not ( doc_path in files ) ) : files . append ( doc_path )
walk and sync all doctypes and pages .