17.2. Pathlib Path

  • Path.absolute() - Get the absolute path

  • Path.resolve() - Get the absolute path

  • Path.relative_to(other) - Get the relative path to another path

  • Path.match(pattern) - Check if the path matches a pattern

  • Path.is_absolute() - Check if the path is absolute

  • Path.is_relative_to(other) - Check if the path is relative to another path

  • Joining paths with the / operator

  • Path.glob() - Find files matching a pattern

  • Path.rglob() - Recursively find files matching a pattern