Public: Prefix a given path with the destination directory.

 paths - (optional) path elements to a file or directory within the
         destination directory

 Returns a path which is prefixed with the destination directory.
10423
def in_dest_dir(*paths)
      paths.reduce(dest) do |base, path|
        Bunto.sanitized_path(base, path)
      end
    end
551518
public static String joinPaths(String prefix, String path, boolean generatedPath) {

		String result = null;
		if (generatedPath) {
			result = joinDomainToPath(prefix, path);
		} else {
			result = joinPaths(prefix, path);
		}
		return result;
	}
1208563
private static String combinePaths(List<String> paths) {
    File file = new File(paths.get(0));

    for (int i = 1; i < paths.size(); i++) {
      file = new File(file, paths.get(i));
    }

    return file.getPath();
  }
147205
def path(self):
        
        path = self.__prefix
        if self is not self.over:
            path = self.over.path + path
        return path
371592
def get_path(self, prefix=None, filename=None):
        """"""
        prefix = prefix or settings.FLOW_EXECUTOR['DATA_DIR']

        path = os.path.join(prefix, self.subpath)
        if filename:
            path = os.path.join(path, filename)

        return path
34732
static String uri(final String... paths) {
        StringBuilder sb = new StringBuilder();
        boolean firstPath = true;
        for (String s : paths) {
            if (s == null || s.isEmpty()) {
                continue;
            }
            if (!s.startsWith("/") && !firstPath) {
                sb.append("/");
            }
            sb.append(stripLeadingSlash(s));
            firstPath = false;
        }
        return sb.toString();
    }
314454
def path_with_slashes(path)
      path = '/' + path unless path.start_with?('/')
      path << '/' unless path.end_with?('/')
      path
    end
1375000
def path_parents(path, root = nil)
      root = "#{root}#{File::SEPARATOR}" if root
      parents = []

      loop do
        parent = File.dirname(path)
        break if parent == path
        break if root && !path.start_with?(root)
        parents << path = parent
      end

      parents
    end
342470
def format_path(path, project)
      full_path = (
        if Pathname.new(path).relative?
          File.join(project.full_path, path)
        else
          path
        end
      )
      Pathname.new(full_path).relative_path_from(Pathname.new(Dir.pwd))
    end
859547
def translate_path(self, path):
        
        # abandon query parameters
        path = path.split('?', 1)[0]
        path = path.split('#', 1)[0]
        # Don't forget explicit trailing slash when normalizing. Issue17324
        trailing_slash = path.rstrip().endswith('/')
        path = posixpath.normpath(urllib.unquote(path))
        # remove url_prefix
        #print "PATH 1: ", path, self._url_prefix
        path = path.replace(self._url_prefix, '/', 1)
        #print "PATH 2: ", path
        words = path.split('/')
        words = filter(None, words)
        # This the new way to NOT only work in CWD
        path = self._root
        for word in words:
            if os.path.dirname(word) or word in (os.curdir, os.pardir):
                # Ignore components that are not a simple file/directory name
                continue
            path = os.path.join(path, word)
        if trailing_slash:
            path += '/'
        #print "PATH: ", path
        #print "URL_PREFIX", self._url_prefix
        #print "PREFIX", self.prefix
        return path
571704
def makedirs(self, path):
        
        root = ""

        assert path.startswith('/')
        p = path.strip('/')
        for item in p.split('/'):
            root += "/" + item
            if not self.exists(root):
                self.makedir(root)

        return self.find(path)
1360085
def path_to( file )
      path = Pathname( file )
              .expand_path
              .relative_path_from( root )
              .to_path

      path.start_with?( '.' ) ? path : File.join( '.', path )
    end
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
1118481
def _prefix_is_authorized(self, path):
        
        path = os.path.abspath(path)
        while True:
            if path in self._prefixes:
                return True
            if path == '/':
                break
            path = os.path.dirname(path)
        return False
192158
function getPathDirectory(length, parts) {
  if (!parts) {
    return '';
  }
  return parts
    .slice(length)
    .filter(part => part !== '')
    .join(path.sep);
}
1018045
def path(self, path):
        
        if os.path.isabs(path):
            return path
        return os.path.join(self.location, path)
993322
def path_type(path, target):
    
    if os.path.isfile(path) and target == "file":
        return True
    elif os.path.isdir(path) and target == "directory":
        return True
    else:
        print("Error: Path given is not a {}: {}".format(target, path))
    return False