Luna::FileCreationMode
enum FileCreationMode : u32
{
create_always= 1
create_new= 2
open_always= 3
open_existing= 4
open_existing_as_new= 5
}
Specifies file creation mmode.
Options
-
Always creates a new file and opens it. If the file already exists, the old file content will be discarded and the file is treated as a new empty file.
-
Only creates a file and opens it when it does not exist. If the file already exists, the call fails with BasicError::already_exists.
-
Always opens a file. If the file already exists, the file will be open with its data preserved, if the file does not exist, it will be created and opened.
-
Only opens a file when it does exists. If the file does not exist, the call fails with BasicError::not_found.
-
Only opens a file when it does exists, and discards the file data so the file is treated as a new file.