This module supports file I/O handling
-
-
TCCFileIO_Functions | This module supports file I/O handling |
Functions | |
f_FIO_open_rdonly | A wrapper function for f_FIO_open. |
f_FIO_open_append_wronly | A wrapper function for f_FIO_open. |
f_FIO_open_append_rdwr | A wrapper function for f_FIO_open. |
f_FIO_open_trunc_wronly | A wrapper function for f_FIO_open. |
f_FIO_open_trunc_rdwr | A wrapper function for f_FIO_open. |
f_FIO_open_append_wronly_excl | A wrapper function for f_FIO_open. |
f_FIO_open_append_rdwr_excl | A wrapper function for f_FIO_open. |
f_FIO_open_trunc_wronly_excl | A wrapper function for f_FIO_open. |
f_FIO_open_trunc_rdwr_excl | A wrapper function for f_FIO_open. |
f_FIO_close | Closes a file associated with the given file descriptor. |
f_FIO_seek_home | Moves the file pointer to the beginning of the file. |
f_FIO_seek_end | Moves the file pointer to the end of the file. |
f_FIO_seek_forward | Moves the file pointer forward with a given number of bytes from the current position. |
f_FIO_seek_backward | Moves the file pointer backward with a given number of bytes from the current position. |
f_FIO_write_data | A wrapper function for f_FIO_write. |
f_FIO_write_text | A wrapper function for f_FIO_write. |
f_FIO_write_data_flush | A wrapper function for f_FIO_write. |
f_FIO_write_text_flush | A wrapper function for f_FIO_write. |
f_FIO_flush | Transfers (“flushes”) all modified in-core data of the file referred to by the file descriptor to the disk device. |
f_FIO_read_data | A wrapper function for f_FIO_read. |
f_FIO_read_text | A wrapper function for f_FIO_read. |
f_FIO_read_text_until | A wrapper function for f_FIO_read_until. |
f_FIO_read_data_until | A wrapper function for f_FIO_read_until. |
f_FIO_read_data_TLV | A wrapper function for f_FIO_read. |
f_FIO_get_error_string | Returns the actual error message. |
f_FIO_get_error_code | Returns the actual error code. |
f_FIO_set_filedescriptor_previousline | If there was no problem, then the return value will be 1. |
f_FIO_chdir | A wrapper function for f_FIO_chdir. |
f_FIO_mkdir | Create a new directory |
f_FIO_rmdir | Removes a directory |
f_FIO_fileOrDirExists | Checks the existence of files and directories. |
f_FIO_stat | Query the permissions of the file or directory. |
f_FIO_chmod | Change the permissions of the file or directory. |
external function f_FIO_open_append_wronly ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for writing only. If the file already exists it is opened in appending mode.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_append_rdwr ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for reading and writing. If the file already exists it is opened in appending mode.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_trunc_wronly ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for writing only. If the file was not empty it is truncated.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_trunc_rdwr ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for reading and writing. If the file was not empty it is truncated.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_append_wronly_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for writing only in exclusive mode. If the file already exists it is opened in appending mode.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_append_rdwr_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for reading and writing in exclusive mode. If the file already exists it is opened in appending mode.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_trunc_wronly_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for writing only in exclusive mode. If the file was not empty it is truncated.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_open_trunc_rdwr_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open. It opens the file with the given name for reading and writing in exclusive mode. If the file was not empty it is truncated.
NAME | The name of the file. |
A valid file descriptor or -1 on error.
external function f_FIO_seek_forward ( in integer pl_fd, in integer pl_bytes ) return integer
Moves the file pointer forward with a given number of bytes from the current position.
FD | A file descriptor. |
BYTES | The number of bytes. |
What the POSIX function lseek returns.
external function f_FIO_seek_backward ( in integer pl_fd, in integer pl_bytes ) return integer
Moves the file pointer backward with a given number of bytes from the current position.
FD | A file descriptor. |
BYTES | The number of bytes. |
What the POSIX function lseek returns.
external function f_FIO_write_data_flush ( in integer pl_fd, in octetstring pl_data ) return integer
A wrapper function for f_FIO_write. It writes binary data and calls f_FIO_flush.
FD | A file descriptor. |
DATA | The data to write to the file. |
Number of bytes written or -1 on error.
external function f_FIO_write_text_flush ( in integer pl_fd, in charstring pl_text ) return integer
A wrapper function for f_FIO_write. It writes textual data and calls f_FIO_flush.
FD | A file descriptor. |
TEXT | The text to write to the file. |
Number of bytes written or -1 on error.
external function f_FIO_read_data ( in integer pl_fd, inout octetstring pl_data, in integer pl_bytes ) return integer
A wrapper function for f_FIO_read. It reads binary data.
FD | A file descriptor. |
DATA | The buffer for storing the data. |
BYTES | The number of bytes to read. |
Number of bytes read or -1 on error.
external function f_FIO_read_text ( in integer pl_fd, inout charstring pl_text, in integer pl_bytes ) return integer
A wrapper function for f_FIO_read. It reads textual data.
FD | A file descriptor. |
TEXT | The buffer for storing the text. |
BYTES | The number of bytes to read. |
Number of bytes read or -1 on error.
external function f_FIO_read_text_until ( in integer pl_fd, inout charstring pl_text, in charstring pl_separator ) return integer
A wrapper function for f_FIO_read_until. It reads textual data.
FD | A file descriptor. |
TEXT | The buffer for storing the text. |
SEPARATOR | The separator pattern. |
Number of bytes read or -1 on error.
external function f_FIO_read_data_until ( in integer pl_fd, inout octetstring pl_data, in octetstring pl_separator ) return integer
A wrapper function for f_FIO_read_until. It reads binary data.
FD | A file descriptor. |
TEXT | The buffer for storing the data. |
SEPARATOR | The separator pattern. |
Number of bytes read or -1 on error.
external function f_FIO_read_data_TLV ( in integer pl_fd, inout octetstring pl_data ) return integer
A wrapper function for f_FIO_read. It reads a full ASN.1 TLV structure in binary data format.
FD | A file descriptor. |
TEXT | The buffer for storing the data. |
SEPARATOR | The separator pattern. |
Number of bytes read or -1 on error.
external function f_FIO_mkdir ( in charstring p_dir_name ) return boolean
Create a new directory
p_dir_name | in charstring - name of the directory to create |
boolean | indicate the successful or unsuccessful directory creation |
In the case of unsuccessful operation the cause of the error can be queried by the f_FIO_get_error_code, f_FIO_get_error_string functions
The path to the directory must exist, so the existence of the path should be checked, and the missing directories should be created recursively.
external function f_FIO_rmdir ( in charstring p_dir_name ) return boolean
Removes a directory
p_dir_name | in charstring - name of the directory to remove |
boolean | indicate the successful or unsuccessful directory creation |
In the case of unsuccessful operation the cause of the error can be queried by the f_FIO_get_error_code, f_FIO_get_error_string functions
The directories must be empty, so the child directories should be cleaned and deleted recursively.
external function f_FIO_fileOrDirExists ( in charstring p_name ) return boolean
Checks the existence of files and directories.
p_name | in charstring - name of the file or directory to check |
boolean | indicate the exictense of the file or diectory |
-
-
external function f_FIO_stat ( in charstring p_name, out FIO_permissions p_permissions ) return boolean
Query the permissions of the file or directory.
p_name | in charstring - name of the file or directory to check |
p_permissions | out FIO_permissions - the permissions of the object |
boolean | indicate sucessfull execution |
-
-
external function f_FIO_chmod ( in charstring p_name, in FIO_permissions p_permissions ) return boolean
Change the permissions of the file or directory.
p_name | in charstring - name of the file or directory to check |
p_permissions | in FIO_permissions - the permissions of the object |
boolean | indicate sucessfull execution |
-
Change the permissions of the file or directory according to the p_permissions. If the value of the field is:
A wrapper function for f_FIO_open.
external function f_FIO_open_rdonly ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_append_wronly ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_append_rdwr ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_trunc_wronly ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_trunc_rdwr ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_append_wronly_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_append_rdwr_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_trunc_wronly_excl ( in charstring pl_name ) return integer
A wrapper function for f_FIO_open.
external function f_FIO_open_trunc_rdwr_excl ( in charstring pl_name ) return integer
Closes a file associated with the given file descriptor.
external function f_FIO_close ( in integer pl_fd ) return integer
Moves the file pointer to the beginning of the file.
external function f_FIO_seek_home ( in integer pl_fd ) return integer
Moves the file pointer to the end of the file.
external function f_FIO_seek_end ( in integer pl_fd ) return integer
Moves the file pointer forward with a given number of bytes from the current position.
external function f_FIO_seek_forward ( in integer pl_fd, in integer pl_bytes ) return integer
Moves the file pointer backward with a given number of bytes from the current position.
external function f_FIO_seek_backward ( in integer pl_fd, in integer pl_bytes ) return integer
A wrapper function for f_FIO_write.
external function f_FIO_write_data ( in integer pl_fd, in octetstring pl_data ) return integer
A wrapper function for f_FIO_write.
external function f_FIO_write_text ( in integer pl_fd, in charstring pl_text ) return integer
A wrapper function for f_FIO_write.
external function f_FIO_write_data_flush ( in integer pl_fd, in octetstring pl_data ) return integer
A wrapper function for f_FIO_write.
external function f_FIO_write_text_flush ( in integer pl_fd, in charstring pl_text ) return integer
Transfers (“flushes”) all modified in-core data of the file referred to by the file descriptor to the disk device.
external function f_FIO_flush ( in integer pl_fd ) return integer
A wrapper function for f_FIO_read.
external function f_FIO_read_data ( in integer pl_fd, inout octetstring pl_data, in integer pl_bytes ) return integer
A wrapper function for f_FIO_read.
external function f_FIO_read_text ( in integer pl_fd, inout charstring pl_text, in integer pl_bytes ) return integer
A wrapper function for f_FIO_read_until.
external function f_FIO_read_text_until ( in integer pl_fd, inout charstring pl_text, in charstring pl_separator ) return integer
A wrapper function for f_FIO_read_until.
external function f_FIO_read_data_until ( in integer pl_fd, inout octetstring pl_data, in octetstring pl_separator ) return integer
A wrapper function for f_FIO_read.
external function f_FIO_read_data_TLV ( in integer pl_fd, inout octetstring pl_data ) return integer
Returns the actual error message.
external function f_FIO_get_error_string () return charstring
Returns the actual error code.
external function f_FIO_get_error_code () return integer
If there was no problem, then the return value will be 1.
external function f_FIO_set_filedescriptor_previousline ( in integer pl_fd ) return integer
A wrapper function for f_FIO_chdir.
external function f_FIO_chdir ( in charstring pl_name ) return boolean
Create a new directory
external function f_FIO_mkdir ( in charstring p_dir_name ) return boolean
Removes a directory
external function f_FIO_rmdir ( in charstring p_dir_name ) return boolean
Checks the existence of files and directories.
external function f_FIO_fileOrDirExists ( in charstring p_name ) return boolean
Query the permissions of the file or directory.
external function f_FIO_stat ( in charstring p_name, out FIO_permissions p_permissions ) return boolean
Change the permissions of the file or directory.
external function f_FIO_chmod ( in charstring p_name, in FIO_permissions p_permissions ) return boolean