![]() |
OTX Reference
|
|
Opens a File on the specified path with write access. More...

Public Attributes | |
| BooleanTerm | append |
| Cardinality [0..1] This parameter is only effective when opening an existing file. If true, the resulting FileWriteHandle will initially contain the original contents of the file. If false, the FileWriteHandle will be created without initial content. If the element is not set, the default value false applies. More... | |
| EncodingTerm | encoding |
| Cardinality [0..1] This represents the encoding to be used. The set of standard encodings, which shall be supported by any runtime system is given by the Encoding enumeration in StringUtil extension, see ISO 13209-3. If the encoding is not specified, it assumes that Strings will be encoded using UTF-8. The encodings HEX, BIN, OCT are not allowed. More... | |
| StringTerm | path |
| Cardinality [1] The file to open. The path shall be defined by a URI (see ISO 13209-2, Annex OTX home and URI recommendation). More... | |
Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term | |
| MetaData | metaData |
| Cardinality [0..1] The MetaData type allows tools to store additional, mainly tool-specific data. More... | |
Opens a File on the specified path with write access.
The OpenFileForWrite term opens an File on the specified path with write access and returns a file handle to this file. If the directory does not exist, the directory and all ancestors shall be created automatically. The underlying runtime system may lock the file to prevent simultaneous reading or writing. For better exchangeability, it is recommended to avoid concurrent write access to a file which is already open for reading or writing.
Important: This term has a side-effect.
| Exceptions.FileAccessException | If access to the file is not allowed, e.g. due to file system permissions. |
| Exceptions.FileOpenException | If the open operation failed, or an encoding HEX, BIN, OCT is used. |
| Exceptions.FileNotFoundException | If the path (file or directory) does not point to an existing file. |
| Exceptions.FileLockException | If the underlying runtime system denies concurrent access. |
| BooleanTerm OpenTestSystem.Otx.Extensions.File.Terms.OpenFileForWrite.append |
Cardinality [0..1]
This parameter is only effective when opening an existing file. If true, the resulting FileWriteHandle will initially contain the original contents of the file. If false, the FileWriteHandle will be created without initial content. If the element is not set, the default value false applies.
Note: The append flag has no influence on other actions that use the opened FileWriteHandle.
| EncodingTerm OpenTestSystem.Otx.Extensions.File.Terms.OpenFileForWrite.encoding |
Cardinality [0..1]
This represents the encoding to be used. The set of standard encodings, which shall be supported by any runtime system is given by the Encoding enumeration in StringUtil extension, see ISO 13209-3. If the encoding is not specified, it assumes that Strings will be encoded using UTF-8. The encodings HEX, BIN, OCT are not allowed.
| StringTerm OpenTestSystem.Otx.Extensions.File.Terms.OpenFileForWrite.path |
Cardinality [1]
The file to open. The path shall be defined by a URI (see ISO 13209-2, Annex OTX home and URI recommendation).