EOF

This function is used to indicate whether the end of a file has been reached, when reading.

Syntax

Returns

Returns true if the end of the file has been reached, otherwise false is returned.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
std::string path = "MyFile.dat";

Stream* stream = FileSystem::WriteFile(path);
if (stream == NULL) Debug::Error("Failed to write file.");

for (int i = 0; i < 10; i++)
{
stream->WriteInt(i);
}

stream->Release();

stream = FileSystem::ReadFile(path);
if (stream == NULL) Debug::Error("Failed to read file.");

while (!stream->EOF())
{
System::Print(stream->ReadInt());
}

stream->Release();

return 0;
}