Esempio n. 1
0
def load_character_deletion_map(storage_folder: str,
                                filename: str) -> Dict[int, type(None)]:
    """Loads a character map that was previously saved in the storage folder.

    :param storage_folder: A string representing the path of the storage
        folder.
    :param filename: A string representing the name of the file that is being
        loaded.
    :return: The character deletion map that was saved in the folder (empty
        if there is no map to load).
    """

    return general_functions.load_file_from_disk(
        loc_folder=storage_folder, filename=filename)
Esempio n. 2
0
def load_character_deletion_map(storage_folder: str,
                                filename: str) -> Dict[int, type(None)]:
    """Loads a character map that was previously saved in the storage folder.

    :param storage_folder: A string representing the path of the storage
        folder.
    :param filename: A string representing the name of the file that is being
        loaded.
    :return: The character deletion map that was saved in the folder (empty
        if there is no map to load).
    """

    return general_functions.load_file_from_disk(loc_folder=storage_folder,
                                                 filename=filename)
Esempio n. 3
0
def load_scrub_optional_upload(storage_folder: str, filename: str) -> str:
    """Loads a option file that was previously saved in the storage folder.

    :param storage_folder: A string representing the path of the storage
        folder.
    :param filename: A string representing the name of the file that is being
        loaded.
    :return: The file string that was saved in the folder (empty if there is
        no string to load).
    """

    try:
        return general_functions.load_file_from_disk(
            loc_folder=storage_folder, filename=filename)
    except FileNotFoundError:
        return ""
Esempio n. 4
0
def load_scrub_optional_upload(storage_folder: str, filename: str) -> str:
    """Loads a option file that was previously saved in the storage folder.

    :param storage_folder: A string representing the path of the storage
        folder.
    :param filename: A string representing the name of the file that is being
        loaded.
    :return: The file string that was saved in the folder (empty if there is
        no string to load).
    """

    try:
        return general_functions.load_file_from_disk(loc_folder=storage_folder,
                                                     filename=filename)
    except FileNotFoundError:
        return ""