def __init__(self, path, file_pattern):
    existing = list(glob(os.path.join(path, file_pattern)))
    n = (len(existing) + 1)
    (pat_left, pat_right) = file_pattern.split('*')
    self.resource_path = os.path.join(path, f'{pat_left}{n}{pat_right}')
def __init__(self, path, file_pattern):
    existing = list(glob(os.path.join(path, file_pattern)))
    n = (len(existing) + 1)
    (pat_left, pat_right) = file_pattern.split('*')
    self.resource_path = os.path.join(path, f'{pat_left}{n}{pat_right}')