TCCFileIO.cc | |
Functions | |
f__FIO__get__error__string | Returns the actual error message. |
f__FIO__get__error__code | Returns the actual error code. |
f__FIO__realize__error | Builds the error message. |
f__FIO__opened | Checks if the file with the given name is already opened. |
f__FIO__opened | Checks if there is a file opened with the given file descriptor. |
f__FIO__open | Opens a file with the given name in the given mode. |
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__close | Closes a file associated with the given file descriptor. |
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__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__flush | Transfers (“flushes”) all modified in-core data of the file referred to by the file descriptor to the disk device. |
f__FIO__write | Writes the given data to the file associated with the given file descriptor. |
f__FIO__write__text | A wrapper function for f__FIO__write. |
f__FIO__write__text__flush | A wrapper function for f__FIO__write. |
f__FIO__write__data | A wrapper function for f__FIO__write. |
f__FIO__write__data__flush | A wrapper function for f__FIO__write. |
f__FIO__read | Reads a given number of bytes to a given buffer from a file associated with the given file descriptor. |
f__FIO__read__text | A wrapper function for f__FIO__read. |
f__FIO__read__data | A wrapper function for f__FIO__read. |
f__FIO__read__text__until | It reads textual data until a given pattern is matched. |
f__FIO__read__data__until | It reads binary data until a given pattern is matched. |
f__FIO__set__filedescriptor__previousline | It sets the file descriptor to the begin of the previous line. |
f__FIO__read__data__TLV | It reads binary data until a full ASN.1 TLV structure is read. |
f__FIO__chdir | It changes the current directory. |
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. |
Opens a file with the given name in the given mode. It creates the file if it doesn’t exist. (For internal use only.)
NAME | The name of the file. |
FLAGS | The way to open the file. |
The file descriptor for the file or -1 on error. The error message is available through the f__FIO__get__error function.
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. |
What f__FIO__open returns or -1 if the file cannot be locked.
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. |
What f__FIO__open returns or -1 if the file cannot be locked.
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. |
What f__FIO__open returns or -1 if the file cannot be locked.
Reads a given number of bytes to a given buffer from a file associated with the given file descriptor. (For internal use only.)
FD | A file descriptor. |
DATA | The buffer where the data will be stored. |
BYTES | The number of bytes to read. |
The number of bytes read or -1 if the requested number of bytes couldn’t be read.
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.
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.
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: