import pathlib


def store_path_constructor(filename, dir_path):
    """ Construct a filepath object for fxcm file store in the designated
    clean store

    :param filename: regex "^[A-Z]{6}_20\\d{1,2}_\\d{1,2}" ex: "AUDCAD_2015_1"
    :param dir_path: base path
    :return: full path
    """
    store = pathlib.Path(dir_path)
    symbol = filename[:6]
    year = filename[7:11]
    full_filename = filename + '.csv.gz'
    return store / symbol / year / full_filename