Seek
This function sets the stream position for reading and writing.
Syntax
Parameters
- pos: the stream position to set.
Returns
Returns an unsigned short value read from the stream.
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.");
stream->WriteLine("Hello!");
stream->Seek(0);
System::Print(stream->ReadLine());
stream->Release();
return 0;
}