Sfoglia il codice sorgente

Start working on project.

Cixo Develop 1 mese fa
parent
commit
7c545e94e4
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. 15 0
      source/handler.py

+ 15 - 0
source/handler.py

@@ -0,0 +1,15 @@
+import pathlib
+
+class handler:
+    def __init__(self, target: pathlib.Path) -> None:
+        if target.is_file():
+            self.__create(target)
+
+        self.__target = target
+
+    def __create(self, target: pathlib.Path) -> None
+        try:
+            target.touch()
+
+        except:
+            RuntimeError("Can not create log file: " + str(target) + ".")