rwx/rwx/__main__.py
2024-09-13 23:22:12 +02:00

19 lines
486 B
Python
Executable file

#! /usr/bin/env python3
"""Entry point."""
from pathlib import Path
from rwx import fs
if __name__ == "__main__":
file_path: Path = Path(__file__).resolve()
root_path: Path = file_path.parent
directory_path: Path = root_path / "tmp"
file_path = directory_path / "file"
fs.wipe(directory_path)
fs.make_directory(directory_path)
fs.write(file_path, "Martine écrit beaucoup.")
fs.empty_file(file_path)
fs.write(file_path, "Martine écrit moins.")