Пример #1
0
    def check_or_create_res_dir(self, filepath, link, i):
        dir_name = ""
        existed = True
        link_list = link.split("/")
        length = len(link_list)
        if length < 2:
            dir_name = str(i)
        else:
            if link_list[length-1] == "":
                dir_name = link_list[length-2]
            else:
                dir_name =link_list[length-1]

        filepath += dir_name
        if not OSUtils.check_folder(filepath):
            existed = False
            OSUtils.create_folder(filepath)
        return filepath, existed
Пример #2
0
 def check_or_create_today_dir(self, filepath):
     date_str = OSUtils.get_date()
     filepath += date_str
     if not OSUtils.check_folder(filepath):
         OSUtils.create_folder(filepath)
     return filepath
Пример #3
0
 def check_or_create_params_dir(self):
     filepath = "results/" + self.engine + "_minp_" + str(self.minp) + "_maxp_" + str(self.maxp) + "_mins_" + str(self.mins) + "_f_" + str(self.f)
     if not OSUtils.check_folder(filepath):
         OSUtils.create_folder(filepath)
     return filepath