@see: L{split_path}

        @type  components: tuple( str... )
        @param components: Path components.

        @rtype:  str
        @return: Absolute or relative path.
323719
def join_path(*components):
        
        if components:
            path = components[0]
            for next in components[1:]:
                path = win32.PathAppend(path, next)
        else:
            path = ""
        return path
1324590
def split(path)
      parts = []
      last_index = 0
      while index = path.index("/", last_index)
        if index == last_index
          parts << ""
        else
          parts << path[last_index...index]
        end
        last_index = index + 1
      end
      # and also get that last segment
      parts << path[last_index..-1]
      # it should begin with a blank segment from the leading "/"; kill that
      parts.shift
      parts
    end
102986
def pathjoin(*parts, **kvs):
    ''''''
    url = kvs.pop('url', '/')
    url = url + '/' + '/'.join(parts)
    url = normalize_url(url)
    return url
9757
def split(path):
    
    if path == '/':
        return ('/', None)

    parent, child = path.rsplit('/', 1)

    if parent == '':
        parent = '/'

    return (parent, child)
268927
def SplitKeyPath(key_path, path_separator=definitions.KEY_PATH_SEPARATOR):
  
  # Split the path with the path separator and remove empty path segments.
  return list(filter(None, key_path.split(path_separator)))
780891
def fullsplit(path, result=None, base_path=None):
    

    if base_path:
        path = path.replace(base_path, '')

    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)
141942
def _JoinKeyPath(self, path_segments):
    
    # This is an optimized way to combine the path segments into a single path
    # and combine multiple successive path separators to one.

    # Split all the path segments based on the path (segment) separator.
    path_segments = [
        segment.split(definitions.KEY_PATH_SEPARATOR)
        for segment in path_segments]

    # Flatten the sublists into one list.
    path_segments = [
        element for sublist in path_segments for element in sublist]

    # Remove empty path segments.
    path_segments = filter(None, path_segments)

    return definitions.KEY_PATH_SEPARATOR.join(path_segments)
381660
public static String cat (Object... components) {
        StringBuilder stringBuilder = new StringBuilder ();
        if (components.length > 0) {
            stringBuilder.append (components[0]);
            for (int i = 1; i < components.length; ++i) {
                stringBuilder.append (BagObject.PATH_SEPARATOR).append (components[i].toString ());
            }
        }
        return stringBuilder.toString ();
    }
383236
def split_path(path):
    
    path = path.split(0, 1)[0]
    values = path.dimension_values(0)
    splits = np.concatenate([[0], np.where(np.isnan(values))[0]+1, [None]])
    subpaths = []
    data = PandasInterface.as_dframe(path) if pd else path.array()
    for i in range(len(splits)-1):
        end = splits[i+1]
        slc = slice(splits[i], None if end is None else end-1)
        subpath = data.iloc[slc] if pd else data[slc]
        if len(subpath):
            subpaths.append(subpath)
    return subpaths
1119099
def PathToComponents(path):
  
  precondition.AssertType(path, Text)
  if path and not path.startswith("/"):
    raise ValueError("Path '{}' is not absolute".format(path))

  if path:
    return tuple(path.split("/")[1:])
  else:
    return ()
179647
function (component) {
            var pathParts = component === 'app' ? ['app'] : ['components'];
            if (component !== 'app') {
                pathParts.push(component);
            }
            pathParts.push('assets');

            return path.resolve(LAZO.FILE_REPO_PATH + path.sep + path.join.apply(this, pathParts));
        }
137921
def splitext(filepath):
    
    exts = getattr(CRE_FILENAME_EXT.search(filepath), 'group', str)()
    return (filepath[:(-len(exts) or None)], exts)
1071717
def os_path_split_asunder(path, debug=False):
        
        parts = []
        while True:
            newpath, tail = os.path.split(path)
            if debug: print repr(path), (newpath, tail)
            if newpath == path:
                assert not tail
                if path: parts.append(path)
                break
            parts.append(tail)
            path = newpath
        parts.reverse()
        return parts
406721
@NonNull
  public static Term tuple(@NonNull Term... components) {
    return tuple(Arrays.asList(components));
  }
1038791
def split_path_and_file(s):
    
    _path = s
    _filename = ""
    try:
        x = os.path.split(s)
        _path = x[0]
        _filename = x[1]
    except Exception:
        print("Error: unable to split path")

    return _path, _filename
764334
def _split_one_end(path):
        
        s = path.rsplit('/', 1)
        if len(s) == 1:
            return s[0], ''
        else:
            return tuple(s)
1225879
def splitext(path):
    # type: (str) -> Tuple[str, str]
    """"""
    base, ext = posixpath.splitext(path)
    if base.lower().endswith('.tar'):
        ext = base[-4:] + ext
        base = base[:-4]
    return base, ext