Browse Source

Start working on project.

Cixo Develop 1 tháng trước cách đây
mục cha
commit
7c545e94e4
1 tập tin đã thay đổi với 15 bổ sung0 xóa
  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) + ".")