Initial folder sync implementation

This commit is contained in:
2022-02-16 12:02:45 -05:00
parent 8af71ceb1a
commit 2ba19f9a39
2 changed files with 25 additions and 2 deletions
+8 -1
View File
@@ -3,7 +3,7 @@
# external modules
from os import remove, listdir
from os.path import expanduser
from os.path import expanduser, isdir, join
from shutil import rmtree
@@ -35,3 +35,10 @@ def deletion_check(_client_device_name):
except FileNotFoundError:
pass
open(expanduser('~/.config/sshyp/deletion_database'), 'a').write(_file_path + '\n')
def folder_check():
open(expanduser('~/.config/sshyp/deletion_database'), 'w').write('')
for _file in listdir(expanduser('~/.password-pasture')):
if isdir(join('~/.config/sshyp/deletion_database/', _file)):
open(expanduser('~/.config/sshyp/folder_database'), 'a').write(_file + '\n')