parameters: (path, newest=True)
return_statement: return current_extreme
docstring: Gets the newest/oldest mtime for all files in a directory.
docstring_summary: Gets the newest/oldest mtime for all files in a directory.
docstring_tokens: Gets the newest / oldest mtime for all files in a directory .
function: def recursive_mtime(path, newest=True):
      """Gets the newest/oldest mtime for all files in a directory."""
      if os.path.isfile(path):
          return mtime(path)
      current_extreme = None
      for dirname, dirnames, filenames in os.walk(path, topdown=False):
          for filename in filenames:
              mt = mtime(pjoin(dirname, filename))
              if newest:  # Put outside of loop?
                  if mt >= (current_extreme or mt):
                      current_extreme = mt
              elif mt <= (current_extreme or mt):
                  current_extreme = mt
      return current_extreme
function_tokens: def recursive_mtime ( path , newest = True ) : if os . path . isfile ( path ) : return mtime ( path ) current_extreme = None for dirname , dirnames , filenames in os . walk ( path , topdown = False ) : for filename in filenames : mt = mtime ( pjoin ( dirname , filename ) ) if newest : # Put outside of loop? if mt >= ( current_extreme or mt ) : current_extreme = mt elif mt <= ( current_extreme or mt ) : current_extreme = mt return current_extreme