IsEOS (NotesStream - JavaScript)

Read-only. Indicates whether the selected position is at the end of the stream.

Defined in

NotesStream

Syntax

isEOS() : boolean
Legal value Description
true indicates end of stream
false indicates not end of stream

Usage

This property is true in the following cases:

Examples

This button makes an exact copy of a file.
var inPath:string = requestScope.filepath;
var n:int = inPath.lastIndexOf(".");
var outPath:string = inPath.left(n) + "Copy" + inPath.right(inPath.length - n);
var inStream:NotesStream = session.createStream();
if (inStream.open(inPath, "binary")) {
	if (inStream.getBytes() > 0) {
		var outStream:NotesStream = session.createStream();
		if (outStream.open(outPath, "binary")) {
			if (!outStream.isReadOnly()) {
				do {
					var buffer = inStream.read(32767);
					outStream.write(buffer);
				} while (!inStream.isEOS());
			} else requestScope.status = "Output file exists and is read-only";
			outStream.close();
		} else requestScope.status = "Output file open failed";
	} else requestScope.status = "Input file has no content";
	inStream.close();
} else requestScope.status = "Input file open failed";