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

Public Attributes | |
| EncodingTerm | encoding |
| Cardinality [0..1] This represents the encoding to be used. 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 read access.
The OpenFileForRead term opens an File on the specified path with read access and returns a file handle to this file. If a file is opened for reading, the underlying runtime system may lock the file against writing. For better exchangeability, it is recommended to avoid concurrent read access to a file which is already open for writing. Simultaneous reading of the same file is possible.
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. |
| EncodingTerm OpenTestSystem.Otx.Extensions.File.Terms.OpenFileForRead.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. 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.OpenFileForRead.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).