parameters: (path, parent)
return_statement: return suffix.startswith(os.path.sep)
docstring: Return True if path is equal to or fully contained within parent.
  
      Assumes both paths are canonicalized with os.path.realpath.
docstring_summary: Return True if path is equal to or fully contained within parent.
docstring_tokens: Return True if path is equal to or fully contained within parent .
function: def is_subpath_of(path, parent):
      """ Return True if path is equal to or fully contained within parent.
  
      Assumes both paths are canonicalized with os.path.realpath.
      """
      parent = normcase(parent)
      path = normcase(path)
  
      if path == parent:
          return True
  
      if not path.startswith(parent):
          return False
  
      # Now we know parent is a prefix of path, but they only share lineage if the
      # difference between them starts with a path separator, e.g. /a/b/c/file
      # is not a parent of /a/b/c/file.cpp, but /a/b/c and /a/b/c/ are.
      parent = parent.rstrip(os.path.sep)
      suffix = path[len(parent):]
      return suffix.startswith(os.path.sep)
function_tokens: def is_subpath_of ( path , parent ) : parent = normcase ( parent ) path = normcase ( path ) if path == parent : return True if not path . startswith ( parent ) : return False # Now we know parent is a prefix of path, but they only share lineage if the # difference between them starts with a path separator, e.g. /a/b/c/file # is not a parent of /a/b/c/file.cpp, but /a/b/c and /a/b/c/ are. parent = parent . rstrip ( os . path . sep ) suffix = path [ len ( parent ) : ] return suffix . startswith ( os . path . sep )