Skip to content

daft.functions.file_exists#

file_exists #

file_exists(file: Expression) -> Expression

Returns whether the file exists.

Parameters:

Name Type Description Default
file File Expression

expression to evaluate.

required

Returns:

Name Type Description
Expression Boolean Expression

expression indicating whether the file exists

Source code in daft/functions/file_.py
104
105
106
107
108
109
110
111
112
113
def file_exists(file: Expression) -> Expression:
    """Returns whether the file exists.

    Args:
        file (File Expression): expression to evaluate.

    Returns:
        Expression (Boolean Expression): expression indicating whether the file exists
    """
    return file._eval_expressions("file_exists")