1.2.7.4.52 SYS_FS_FILE_OPEN_ATTRIBUTES Enum

C

typedef enum
{
    /*
    reading the file        = possible, if file exists.
    reading the file        = file open returns error, if file does not exist.
    writing to the file     = not possible. Write operation returns error
    */
    SYS_FS_FILE_OPEN_READ  = 0,

    /*
    reading the file        = not possible. Read operation returns error.
    writing to the file     = possible. If file exists, write happens from the
                              beginning of the file, overwriting the existing
                              content of the file.
    writing to the file     = If file does not exist, a new file will be created
                              and data will be written into the newly created file.
    */
    SYS_FS_FILE_OPEN_WRITE,

    /*
    reading the file        = not possible. Read operation returns error
    writing to the file     = possible. If file exists, write happens from
                              the end of the file, preserving the existing
                              content of the file.
    writing to the file     = If file does not exist, a new file will be created
                              and data will be written into the newly created file.
    */
    SYS_FS_FILE_OPEN_APPEND,

    /*
    reading the file        = possible, if file exists.
    reading the file        = file open returns error, if file does not exist.
    writing to the file     = possible, if file exists, staring from the beginning
                              of the file (overwriting).
    writing to the file     = file open returns error, if file does not exist.
    */
    SYS_FS_FILE_OPEN_READ_PLUS,

    /*
    reading the file        = possible, if file exists.
    reading the file        = If file does not exist, a new file will be created.
    writing to the file     = possible. If file exists, write happens from
                              the beginning of the file, overwriting the existing
                              content of the file.
    writing to the file     = If file does not exist, a new file will be created
                              and data will be written into the newly created file.
    */
    SYS_FS_FILE_OPEN_WRITE_PLUS,

    /*
    reading the file        = possible, if file exists. File read pointer
                              will be moved to end of the file in this mode.
    reading the file        = If file does not exist, a new file will be created.
    writing to the file     = possible. If file exists, write happens from
                              the end of the file, preserving the existing
                              content of the file.
    writing to the file     = If file does not exist, a new file will be created
                              and data will be written into the newly created file.
    */
    SYS_FS_FILE_OPEN_APPEND_PLUS

} SYS_FS_FILE_OPEN_ATTRIBUTES;

Summary

Lists the various attributes (modes) in which a file can be opened.

Description

This enumeration lists the various attributes (modes) in which a file can be opened.

Remarks

None.