Skip to main content
Version: 1.0

join

join(var path: String, *paths: String) -> String

Join two or more pathname components, inserting '/' as needed. If any component is an absolute path, all previous path components will be discarded. An empty last part will result in a path that ends with a separator.

Example:

from std.os.path import join

join("a", "b", "c") # returns "a/b/c"
join("a", "/b", "c") # returns "/b/c" (absolute resets)

Args:

  • path (String): The path to join.
  • *paths (String): The paths to join.

Returns:

String: The joined path.