path

Cross-platform path manipulation utilities.

Import

import path

Functions

path.join(parts...) -> str

Join path components with the platform separator.

path.basename(p: str) -> str

Return the filename component of a path.

path.dirname(p: str) -> str

Return the directory component of a path.

path.ext(p: str) -> str

Return the file extension including the dot, e.g. ".txt".

path.stem(p: str) -> str

Return the filename without extension.

path.sep

Platform path separator ("/" on Unix, "\\" on Windows).

Examples

scratch.xs