CIFS Open Function Encoding

Open function encoding specifies the action to be taken on opening a file.

The open function is encoded as a 16-bit field in the following format:

1111 11
5432 1098 7654 3210
rrrr rrrr rrrC rrOO
  • C

    Value Description
    0 If the file does not exist, return Fail.
    1 If the file does not exist, create a file.
  • r
    Reserved.

  • O

    Value Description
    0 If the file exists, return Fail.
    1 If the file exists, open the file.
    2 If the file exists, truncate the file.

See Also

Royalty-Free CIFS Technical Reference License Agreement