def _is_valid_path()

in launcher/config_validator/type_validator.py [0:0]


def _is_valid_path(path) -> bool:
    """
    Check if the input string is a valid file path.

    Parameters:
    path (str): The path to validate.

    Returns:
    bool: True if the path is valid, False otherwise.
    """
    if not isinstance(path, str):
        return False

    try:
        normalized_path = os.path.normpath(path)
        return True
    except Exception as e:
        return False