(Added) path checking function.

This commit is contained in:
2023-03-09 17:29:00 +02:00
parent bb9851057f
commit e440cc24ac
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -18,6 +18,7 @@
################################################################################
from peewee import *
import os
db = SqliteDatabase('sync.db')
@@ -34,6 +35,9 @@ class Path(BaseModel):
def __repr__(self) -> str:
return f"Path({self.path})"
def is_exists(self) -> bool:
return os.path.exists(self.path)
class SyncCommand(BaseModel):
command = CharField()