The `pathlib` module provides an object-oriented approach to filesystem operations. It offers a more intuitive way to handle file paths and directories.
Example:
from pathlib import Path
path = Path('example.txt')
if path.exists():
print('File exists')
else:
print('File does not exist')