from pathlib import Path

working_directory = Path(".")
folder = "slozka"
file_name = "in.txt"

file_path = folder + "/" + file_name
file_path = f"{folder}/{file_name}"
file_path = working_directory / folder / file_name
with open(file_path) as file:
    print(file.readlines())

file_path = working_directory / ".." / "05" / "in.txt"
with open(file_path) as file:
    print(file.readlines())


current_file_path = Path(__file__)
print("Tenhle soubor:", current_file_path)

print("Jeho složka", current_file_path.parent)


print("\nPath properties")

def print_path_properties(path):
    print(f"path: {path}")
    print(f"drive: {path.drive}")
    print(f"parent: {path.parent}")
    print(f"parents: {[x for x in path.parents]}")
    print(f"name: {path.name}")
    print(f"suffix: {path.suffix}")
    print(f"stem: {path.stem}")
    print(f"possix: {path.as_posix()}")
    print(f"absolute: {path.is_absolute()}")
    print(f"exists: {path.exists()}")
    print(f"dir: {path.is_dir()}")
    print(f"file: {path.is_file()}")
    print()

print_path_properties(Path("."))
print_path_properties(Path(".").resolve())
print_path_properties(Path(__file__))
