def load_file_list(path=None, regx='<STR_LIT>', printable=True, keep_prefix=False):
if path is None:<EOL><INDENT>path = os.getcwd()<EOL><DEDENT>file_list = os.listdir(path)<EOL>return_list = []<EOL>for _, f in enumerate(file_list):<EOL><INDENT>if re.search(regx, f):<EOL><INDENT>return_list.append(f)<EOL><DEDENT><DEDENT>if keep_prefix:<EOL><INDENT>for i, f in enumerate(return_list):<EOL><INDENT>return_list[i] = os.path.join(path, f)<EOL><DEDENT><DEDENT>if printable:<EOL><INDENT>logging.info('<STR_LIT>' % return_list)<EOL>logging.info('<STR_LIT>' % len(return_list))<EOL><DEDENT>return return_list<EOL>
r"""Return a file list in a folder by given a path and regular expression.

    Parameters
    ----------
    path : str or None
        A folder path, if `None`, use the current directory.
    regx : str
        The regx of file name.
    printable : boolean
        Whether to print the files infomation.
    keep_prefix : boolean
        Whether to keep path in the file name.

    Examples
    ----------
    >>> file_list = tl.files.load_file_list(path=None, regx='w1pre_[0-9]+\.(npz)')