Skip to content

Commit

Permalink
Update setup_folders.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin authored Jul 27, 2024
1 parent 9f0bf2a commit ba18313
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions evdspy/EVDSlocal/initial_setup/setup_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,34 @@
from evdspy.EVDSlocal.initial.start_options import *
from ..common.colors import *
from evdspy.EVDSlocal.initial.start_options import default_data_folder_name
dirs = ("pickles", default_data_folder_name)
# dirs = ("pickles", default_data_folder_name)
dirs = ( default_data_folder_name , )
cur_folder = Path()
import time

def get_cache_folder():
pickle_folder = Path.home() / ".cache" / "evdspy"
return pickle_folder
def create_cache_folder():
pickle_folder =get_cache_folder()
create_directory(str(pickle_folder))
def check_folders_setup_necessary():
for item in dirs:
folder_ = cur_folder.absolute() / item
if not folder_.is_dir():
return True
return False
pickle_folder =get_cache_folder()

return pickle_folder.is_dir()
def check_setup():
return not check_folders_setup_necessary()
def setup_folders():

if not check_folders_setup_necessary():
return
create_cache_folder()
for item in dirs:
folder_ = cur_folder.absolute() / item
print_with_creating_style(f"Creating directory...{folder_}")
create_directory(str(folder_))
time.sleep(0.8)
time.sleep(0.8)

0 comments on commit ba18313

Please sign in to comment.