Returns a new conflict with a prepended prefix as a path.
180437
def with_prefix(self, root_path):
        """"""
        return Conflict(self.conflict_type, root_path + self.path, self.body)
976071
def resolve_frompath(pkgpath, relpath, level=0):
    """"""
    if level == 0:
        return relpath
    parts = pkgpath.split('.') + ['_']
    parts = parts[:-level] + (relpath.split('.') if relpath else [])
    return '.'.join(parts)
1293720
def IntersectPath(self, path, intersection):
    
    node = self._root
    for name in path.split('.'):
      if name not in node:
        return
      elif not node[name]:
        intersection.AddPath(path)
        return
      node = node[name]
    intersection.AddLeafNodes(path, node)
1136329
function generateConflictedPath(fs, path, callback) {
  var dirname = Path.dirname(path);
  var basename = Path.basename(path);
  var extname = Path.extname(path);

  var now = new Date();
  var dateStamp = now.getFullYear() + '-' +
        now.getMonth() + '-' +
        now.getDay() + ' ' +
        now.getHours() + ':' +
        now.getMinutes() + ':' +
        now.getSeconds();
  var conflictedCopy = ' (Conflicted Copy ' + dateStamp + ')';
  var conflictedPath = Path.join(dirname, basename + conflictedCopy + extname);

  // Copy the file using the conflicted filename. If there is
  // already a conflicted file, replace it with this one.
  fsUtils.forceCopy(fs, path, conflictedPath, function(err) {
    if(err) {
      return callback(err);
    }

    // Send the new path back on the callback
    callback(null, conflictedPath);
  });
}
318371
def start_namespace(self, prefix, uri):
        
        self._g.startPrefixMapping(prefix, uri)
        self._ns[prefix] = uri
286972
def prepend_path(path)
      self.config = hash_reassoc(config, :paths) do |paths|
        path = File.expand_path(path, config[:root]).freeze
        paths.unshift(path)
      end
    end
218682
public static String joinPaths(String prefix, String path) {

		String joinedPath = null;
		if (prefix.startsWith(JawrConstant.HTTP_URL_PREFIX) || prefix.startsWith(JawrConstant.HTTPS_URL_PREFIX)
				|| prefix.startsWith("//")) {
			joinedPath = joinDomainToPath(prefix, path);
		} else {

			String normalizedPrefix = PathNormalizer.normalizePath(prefix);

			StringBuilder sb = new StringBuilder(JawrConstant.URL_SEPARATOR);
			if (!"".equals(normalizedPrefix))
				sb.append(normalizedPrefix).append(JawrConstant.URL_SEPARATOR);
			sb.append(PathNormalizer.normalizePath(path));
			joinedPath = sb.toString();
		}

		return joinedPath;
	}
918858
def add_path(prev: Optional[ResponsePath], key: Union[str, int]) -> ResponsePath:
    
    return ResponsePath(prev, key)
283057
function prefix(value, prefix, ignored = []) {
	if (prefix === false) {
		return value;
	}

	if (ignored.includes(prefix)) {
		return toDashCase(value);
	}

	return prefix + '-' + toDashCase(value);
}
1259267
def normpath(path, keep_trailing=False):
    """"""
    new_path = k_paths.normpath(path)
    if keep_trailing and path.endswith("/") and not new_path.endswith("/"):
        new_path = new_path + "/"
    if not new_path.startswith('/'):
        return '/' + new_path
    return new_path
894375
def prefix?(other)
      other = other.to_key_path
      return false if other.length > length

      key_enum = each
      other.all? { |other_key| key_enum.next == other_key }
    end
1276024
def __extend_uri(prefixes, short):
    
    for prefix in prefixes:
        if short.startswith(prefix):
            return short.replace(prefix + ':', prefixes[prefix])
    return short
576233
def prefixed(self, prefix):
        """"""
        old_prefix = self._prefix
        if old_prefix is None:
            self._prefix = prefix
        else:
            self._prefix = "{}{}".format(old_prefix, prefix)
        yield self
        self._prefix = old_prefix
92407
function match(path) {
    if (path.indexOf(prefix) !== 0) {
      return false;
    }

    const newPath = path.replace(prefix, '') || '/';
    if (trailingSlash) {
      return newPath;
    }

    if (newPath[0] !== '/') {
      return false;
    }

    return newPath;
  }
1170734
def fixpath(path):
    """"""
    norm = osp.normcase if os.name == 'nt' else osp.normpath
    return norm(osp.abspath(osp.realpath(path)))
536243
def longest_dir_prefix(path, prefixes):
  
  longest_match, longest_prefix = 0, None
  for prefix in prefixes:
    if fast_relpath_optional(path, prefix) is not None and len(prefix) > longest_match:
      longest_match, longest_prefix = len(prefix), prefix

  return longest_prefix
1151343
def create_prefix_dir(self, path, fmt):
        """"""
        create_prefix_dir(self._get_os_path(path.strip('/')), fmt)