Skip To Content

INTEGRAL

INTEGRAL DSL Reference Guide

Jump directly to: 

::my.app.Write(filename, flags = 0)

This function writes the contents of a file to the INTEGRAL output buffer.

Parameters

filename

A string containing the name (path) of the file to be written to the output buffer. This path is relative to the current working directory.

flags

A bitmask that can be used to customize the behavior of the function.

Return Value

The function returns DV_RET_OK on success and DV_RET_ERR on failure.

Notes

This function can be called multiple times during a web session. Once Write is called, the buffer output mode is set to binary; any subsequent calls to Print or any other function that writes to the output buffer in text mode will fail.

Example 1

::my.app.Write("private/document.pdf");

Example 2

::my.app.SetHeaders("Content-Disposition: attachment; filename=\"document.txt\"\r\n");
::my.app.Write("private/doc_part_1.txt");
::my.app.Write("private/doc_part_2.txt", 1);
::my.app.Write("private/doc_part_3.txt", 1);