Explorar o código

Start working on project.

Cixo Develop hai 1 mes
pai
achega
7c545e94e4
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  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) + ".")