Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | fileOpen(path_to_file, mode) | Package | file | Alias | | Pkg Usage | open(path_to_file, mode) | |
Description
Excerpt |
---|
|
Opens a file in memory so that it may be read from. |
Opens a file in memory so that it may be read from. Note that the file is seen as an octet stream, encoding doesn’t matter from this point of view. File may be read and written at random locations.
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
path_to_file | String | Yes | Specifies the path to the file that should be opened. | mode | Boolean | Yes | If 'true' the file will be opened in read only mode. If 'false' the file will be editable. | |
Return Type
integerInteger
The id of the file that was opened. The id has no meaning beyond the script.
Error Handling
Throws Stringstring
...
- "invalid - ": if the path is invalid
unresolvable
- if the file cannot be resolved
- "cannot_work_on_directory - ": if the path is a directory, in fact, and not a file
- "unresolvable": if the file cannot be resolved
- "notfound - ": if the file is not found
Example
Example 1
Code Block |
---|
|
use "file";
int fid = open(filename); //fileOpen
fileClose(fid);//full name of the routine |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "file_ |
---|
|
...
routine" and space = currentSpace ( ) | labels | array_routines |
---|
|