System::WriteFile

System::WriteFile will write to the contents of a file previously opened by System::CreateFile.

public System::WriteFile(
   OSHandle FileHandle,
   variable FileContents,
   Integer Position = TVariable::None
);

Parameters

FileHandleFrom previous call to System::CreateFile.
FileContentsa buffer containing the contents to be written to the file.
Positionwill write to the current file position if default parameter is passed.

Return Values

The error.errorCode value will be set to the underlining windows error message code and the error.errorString will have a detailed description of the error.

Remarks

Example Use
  • C++
variable fileHandle, fileBuffer = "Hello to the entire world!";
System::CreateFile(L"MyFile.txt",System::CREATE_ALWAYS:fileHandle);
System::WriteFile(fileHandle,fileBuffer);

Since

TScript Version 1.0

Also See

System::CreateFile, System::ReadFile, System::SetFilePointer
Listen All
Comments (0)
Characters left: 2500
 
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript