Standard Library

Path

import path
FunctionReturnsDescription
path.basename(p)StrFilename from path
path.dirname(p)PathDirectory part
path.ext(p)StrFile extension
path.stem(p)StrFilename without extension
path.join(base, child)PathJoin path components
path.normalize(p)PathNormalize . and .. segments
path.is_absolute(p)BoolWhether path starts with /
path.parent(p)PathParent directory
path.parts(p)List[Str]Split path into segments

The older path_* prefixed names (e.g. path_basename()) have been removed. Use the namespace style above for all code.

← Logging
Decimal →