@classmethod
  def create_from_spec(cls, ftype, canonical_at, filespec):

    parts = _norm_with_dir(filespec).split(os_sep)
    if cls._DOUBLE in parts[0]:
      if parts[0] != cls._DOUBLE:
        raise ValueError(
            'Illegal component "{}" in filespec: {}'.format(parts[0], join(canonical_at, filespec)))
      # There is a double-wildcard in a dirname of the path: double wildcards are recursive,
      # so there are two remainder possibilities: one with the double wildcard included, and the
      # other without.
      remainders = (join(*parts[1:]), join(*parts[0:]))
      return PathDirWildcard(ftype, canonical_at, parts[0], remainders)
    elif cls._SINGLE not in parts[0]:
      # A literal path component. Look up the first non-canonical component.
      if len(parts) == 1:
        return Path(join(canonical_at, parts[0]))
      return PathLiteral(ftype, join(canonical_at, parts[0]), join(*parts[1:]))
    elif len(parts) == 1:
      # This is the path basename, and it contains a wildcard.
      return PathWildcard(canonical_at, parts[0])
    else:
      # This is a path dirname, and it contains a wildcard.
      remainders = (join(*parts[1:]),)
      return PathDirWildcard(ftype,
                             canonical_at,
                             parts[0],
                             remainders)
Start adb if not started already
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/engine/exp/fs.py/PathGlob.create_from_spec--crossover with--dataset/ETHPy150Open seandroid-analytics/seal/sealib/device.py/Device.__start_adb