Esempio n. 1
0
 def check_and_create_directories():
     print("Check and create directories")
     fs = FileSystem()
     directories = [
         config.PATH_TO_OUTPUT_DIR,
         fs.join_path(config.PATH_TO_OUTPUT_DIR),
     ]
     UtilityMethods.check_and_remove_directories(directories[0])
     UtilityMethods.check_and_create_directories(directories)
     return {"output": fs.absolute_path(directories[0])}
Esempio n. 2
0
 def prepare_and_get_output_excel_path(path_to_destination_directory):
     fs = FileSystem()
     full_path_to_template = fs.absolute_path(
         config.PATH_TO_EXCEL_OUTPUT_TEMPLATE_FILE)
     file_name = fs.get_file_name(full_path_to_template)
     source_path = full_path_to_template
     destination_path = fs.join_path(path_to_destination_directory,
                                     file_name)
     fs.copy_file(destination=destination_path, source=source_path)
     return destination_path