OTX Reference  
OpenTestSystem.Otx.Extensions.File.Actions.WriteLine Class Reference

Appends the specified string value followed by a line terminator to the file handle. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.File.Actions.WriteLine:
Inheritance graph

Public Attributes

FileWriteHandleTerm handle
 The handle for the file that the related file object encapsulates. More...
 
StringTerm value
 The string to write to the file. The string can contain line breaks. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Appends the specified string value followed by a line terminator to the file handle.

The WriteLine activity appends the specified string value followed by a line terminator to the file handle.

The style of the line break shall be taken from the underlying operating system (Unix: '
', Windows: '\r
' or MacOS '\r'). The first read or write activity on a file handle defines if an access shall be realized by line, bytes or file. Mixed access will lead to a FileFormatException.

Exceptions
Exceptions.FileAccessException
Exceptions.FileFormatException
Exceptions.FileLockException


Syntax
File.WriteLine(FileWriteHandleTerm handle, StringTerm value);
FileWriteHandleTerm handle
The handle for the file that the related file object encapsulates.
Definition: File.cs:421
StringTerm value
The string to write to the file. The string can contain line breaks.
Definition: File.cs:431
Examples
// Local Declarations
File.FileWriteHandle FileWriteHandle1;
// Flow
FileWriteHandle1 = File.OpenFileForWrite("file:///D:/abc/abc.txt", false, @Encoding:UTF-8);
File.WriteLine(FileWriteHandle1, "Hello\r\nWord");
File.WriteLine(FileWriteHandle1, "Hello Word");

Member Data Documentation

◆ handle

FileWriteHandleTerm OpenTestSystem.Otx.Extensions.File.Actions.WriteLine.handle

The handle for the file that the related file object encapsulates.

◆ value

StringTerm OpenTestSystem.Otx.Extensions.File.Actions.WriteLine.value

The string to write to the file. The string can contain line breaks.