DESCRIPTION:
Open a file. flags can be a combination of the following
characters:
- r - request read access
- w - request write access
- c - open with O_CREAT, create file, if it doesn't exist.
- e - open with O_EXCL - try to exclusively lock the file.
- t - open with O_TRUNC - truncate file, if it exists.
- a - open file for appending.
mode is only required, if the "c" flag is set. It determines
the mode with which the file is created (modulo the set umask,
so normally just leaving it to the default 0666 will be ok).