Difference between revisions of "Extensions.File.WriteBytes"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | File.WriteBytes(FileWriteHandleTerm, ByteFieldTerm); | + | File.WriteBytes(FileWriteHandleTerm handle, ByteFieldTerm value); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''WriteBytes''' activity appends the specified bytes to the | + | The '''WriteBytes''' activity appends the specified bytes to the file handle. |
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 [[Extensions.File.FileFormatException|FileFormatException]]. | 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 [[Extensions.File.FileFormatException|FileFormatException]]. |
Latest revision as of 09:59, 2 November 2018
Classification
Name | WriteBytes |
Short Description | Appends the specified bytes to the filehandle |
Class | Action |
Extension | OTX File extension |
Group | File related Actions |
Exceptions | FileAccessException FileFormatException FileLockException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
File.WriteBytes(FileWriteHandleTerm handle, ByteFieldTerm value);
Description
The WriteBytes activity appends the specified bytes to the file handle.
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.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Handle | FileWriteHandle | Term | - | [1..1] | The handle for the file that the related file object encapsulates. |
Value | ByteField | Term | - | [1..1] | The ByteField to write to the file. |
OTL Examples
/// Local Declarations
File.FileWriteHandle FileWriteHandle1;
/// Flow
FileWriteHandle1 = File.OpenFileForWrite("file:///D:/abc/abc.txt", false, @Encoding:UTF-8);
File.WriteBytes(FileWriteHandle1, &48656C6C6F);
See also
CloseFile
DeleteDirectory
DeleteFile
SaveFile
WriteFile
WriteLine