MutaPath.
mutate
Create a mutable context for this immutable path.
>>> with Path('/home/doe/folder/sub').mutate() as mut: ... mut.name = "top" Path('/home/doe/folder/top')