def METHOD_NAME(self, path: str = "", pattern: str = None) -> List[str]:
    """
    List the files in a directory on the FTP server.
    Args:
        path (str): The path to the directory on the FTP server.
        pattern (str, optional): A regex pattern to filter the files by. Defaults to None.
    """
    if path == ".":
        path = ""
    files = self._ftp.nlst(path)
    if pattern:
        pattern = re.compile(pattern)
        files = [f for f in files if pattern.match(f)]
    return files