1# Copyright (c) 2018 Ultimaker B.V.
2# libCharon is released under the terms of the LGPLv3 or higher.
3
4import enum #The class in this file is an enum.
5
6##  The possible purposes for which you could open a file.
7#
8#   You could always open a file in read-write mode, but it's best practice to
9#   open a file in specific read or write only modes if only one of the two is
10#   needed. This will prevent the programmer from accidentally modifying the
11#   file and may trigger some operating systems to treat the file lock
12#   differently.
13class OpenMode(enum.Enum):
14    ##  The file can only be read from.
15    ReadOnly = "r"
16
17    ##  The file can only be written to.
18    WriteOnly = "w"