parameters: (filename)
return_statement: return curdir
docstring: Searches for the root of the WebRTC checkout.
  
    Simply checks parent directories until it finds .gclient and src/.
  
    Args:
      filename: (String) Path to source file being edited.
  
    Returns:
      (String) Path of 'src/', or None if unable to find.
docstring_summary: Searches for the root of the WebRTC checkout.
docstring_tokens: Searches for the root of the WebRTC checkout .
function: def FindWebrtcSrcFromFilename(filename):
      """Searches for the root of the WebRTC checkout.
  
    Simply checks parent directories until it finds .gclient and src/.
  
    Args:
      filename: (String) Path to source file being edited.
  
    Returns:
      (String) Path of 'src/', or None if unable to find.
    """
      curdir = os.path.normpath(os.path.dirname(filename))
      while not (os.path.basename(curdir) == 'src'
                 and PathExists(curdir, 'DEPS') and
                 (PathExists(curdir, '..', '.gclient')
                  or PathExists(curdir, '.git'))):
          nextdir = os.path.normpath(os.path.join(curdir, '..'))
          if nextdir == curdir:
              return None
          curdir = nextdir
      return curdir
function_tokens: def FindWebrtcSrcFromFilename ( filename ) : curdir = os . path . normpath ( os . path . dirname ( filename ) ) while not ( os . path . basename ( curdir ) == 'src' and PathExists ( curdir , 'DEPS' ) and ( PathExists ( curdir , '..' , '.gclient' ) or PathExists ( curdir , '.git' ) ) ) : nextdir = os . path . normpath ( os . path . join ( curdir , '..' ) ) if nextdir == curdir : return None curdir = nextdir return curdir