NAME

ispipe - returns whether file is a pipe to an external executable

SYNOPSIS

file.ispipe()

DESCRIPTION

On some operating systems, OADL supports read and write pipes to external executables. This is done via the new File syntax, with a "p" as the first character of the mode. The ispipe() intrinsic method queries whether the file was created with the "p" mode.

Note that pipes are read-only or write-only; bidirectional pipes are not supported.

RETURN VALUE

true if file was created with the "p" mode, and false otherwise.

ERRORS

ArgCheck if arguments are specified
TypeCheck if file is not a File
AccessCheck if file is closed

EXAMPLE

    if (!file.ispipe()) {
        fseek(file, 0, SEEK_END);
    }

SEE ALSO

new File