See Python Pathlib Path Function Matlab Example