Python pathlib

from pathlib import Path

# current user home folder
home = Path.home()

# write
path = Path("/tmp/pathlib-test")
path.write_bytes(b"foo")
path.write_text("bar")

# read
assert path.read_bytes() == b"bar"
assert path.read_text() == "bar"

# existence, removing
assert path.exists()
path.unlink()
assert not path.exists()

# walk recursively
for path in Path("/tmp").rglob("*"):
    print(path)