Returns the fully qualified path by searching Path of the given
        name
183834
def which(self, fname):
        """"""
        for pe in os.environ['PATH'].split(os.pathsep):
            checkname = os.path.join(pe, fname)
            if os.access(checkname, os.X_OK) and not os.path.isdir(checkname):
                return checkname
        return None
834455
public String makeFullPath(String prefix, String... name) {
        StringBuilder sb=new StringBuilder(prefix == null ? "/" : (prefix.equals("/")?prefix:prefix+"/"));
        boolean first=true;
        for (String s : name) {
            if(s==null) continue;
            if(!first){
                sb.append("/");
            }else
                first=false;
            sb.append(s);
        }
        return sb.toString();
    }
165596
def find(name, version = nil)
      name     = Pathname.new(name)
      stem     = name.basename
      version  = version && version.strip != '' ? version.strip : nil
      ext      = '.js'
      possible_paths = if version
        [
          /#{stem}-#{version}\/#{name}#{ext}$/,
         /#{name}-#{version}#{ext}$/
        ]
      else
        [
          /#{name}#{ext}/,
          /#{name}-[\d\w\.\-]+#{ext}/
        ]
      end
      final = false
      each_file_in_index(ext) do |filename|
        possible_paths.each do |p|
          if File.file?(filename) && p.match(filename)
            final = Pathname.new(filename).expand_path
            block_given? ? yield(final) : break
          end
        end
        break if final && !block_given?
      end
      final
    end
667885
def get_extra_path(name):
    
    # Paths are cached in path_cache
    helper_name, _, key = name.partition(".")
    helper = path_helpers.get(helper_name)
    if not helper:
        raise ValueError("Helper '{0}' not found.".format(helper))
    if name not in path_cache:
        extra_paths = helper.extra_paths()
        path_cache.update(extra_paths)
    extra_path = path_cache.get(name)
    if not extra_path:
        raise ValueError("Helper '{0}' has no path called {1}".format(helper_name, name))
    return extra_path
629132
def path_for_name(name)
      possible_paths = [repos[name.to_s], "repos/#{name}", name].compact
      path = possible_paths.detect do |path|
        Dir[path].present?
      end
      raise BadRepoName.new(name, possible_paths) if path.nil? || path.empty?
      path
    end
1036897
function (sName) {
			var iIndex = sName.indexOf("/");

			if (iIndex >= 0) {
				// consider only the first path segment
				sName = sName.slice(0, iIndex);
			}
			// now we have a qualified name, drop the last segment (the name)
			iIndex = sName.lastIndexOf(".");

			return iIndex < 0 ? "" : sName.slice(0, iIndex);
		}
1005388
private function getSubPathByName(string $path, string $name): string
    {
        return '' === $path ? $name : $path.'.'.$name;
    }
1207419
def cnormpath (path):
    """"""
    path = normpath(path)
    if os.name == 'nt':
        # replace slashes with backslashes
        path = path.replace("/", "\\")
    if not os.path.isabs(path):
        path = normpath(os.path.join(sys.prefix, path))
    return path
402249
def rel_path(name, available_tools):
        
        if name == '@' or name == '.' or name == '/':
            name = ''
        multi_tool = '@' in name
        for tool in available_tools:
            t_name = tool[0].lower()
            if multi_tool:
                if name.split('@')[-1] == t_name.split('@')[-1]:
                    return t_name, t_name
            else:
                if name == t_name.split('/')[-1]:
                    return t_name, tool[0]
                elif name == '' and t_name.split('@')[-1] == 'unspecified':
                    return '', ''
        return None, None
147510
public String getFullPath(String path) {

		if (StringUtils.isEmpty(pathPrefix)) {
			return path;
		}

		return PathNormalizer.asPath(pathPrefix + path);
	}
775822
def _get_relative_path(self):
    """"""
    param_string = self._get_query_string()
    if self.path is None:
      path = '/'
    else:
      path = self.path
    if param_string:
      return '?'.join([path, param_string])
    else:
      return path
697137
def get_name_from_path(full_path, root_path):
    """"""
    relative_image_path = os.path.relpath(full_path, root_path)
    return "_".join(relative_image_path.split('.')[:-1]).replace('/', '_')\
        .replace(';', '').replace(':', '')
853017
def _get_path(self, name):
        
        path = self.option("path")
        if path is None:
            path = self._get_seeders_path()

        return os.path.join(path, "%s.py" % name)
835706
def get_fullpath(self, fullname=None, relative_to=None):
        
        # if is an empty path
        if not fullname:
            return fullname

        isabs = os.path.isabs(fullname)

        path, name = os.path.split(fullname)

        if not name:  # path to a folder
            return None
        else:  # path to a file
            if isabs:
                return fullname
            else:
                return os.path.join(self.case_path, path, name)
1106018
public static String joinZKPath(String path, String name) {
        if (path.endsWith("/")) {
            return path + name;
        } else {
            return path + "/" + name;
        }
    }
1341022
Path toField(String name) {
        if (isRoot()) {
            return copy(name);
        } else {
            return copy(path + "." + name);
        }
    }
799725
protected function getChild(string $name): Path {
    $full_path = "{$this->path}/$name";

    if($this->driver->isDir($full_path)) {
      return $this->driver->getDirectory($full_path);
    }

    return $this->driver->getFile($full_path);
  }