DescriptionAdd an "append flag" to base::PlatformFile.
PLATFORM_FILE_APPEND is exclusive with PLATFORM_FILE_WRITE. This is because on Windows, if we were to apply both flags, the behavior would not be consistent with O_APPEND.
On Posix, PLATFORM_FILE_APPEND provides O_APPEND, and either O_WRONLY or O_RDWR, depending on other flags.
On Windows, PLATFORM_FILE_APPEND provides FILE_APPEND_DATA, and fails to create the plaform file if PLATFORM_FILE_WRITE is also passed.
BUG=242383
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=205217
Patch Set 1 #Patch Set 2 : windows fix attempt #Patch Set 3 : Remove unnecessary braces #
Total comments: 2
Patch Set 4 : Fix case when a file is opened with append, but not read. #
Total comments: 7
Patch Set 5 : Style, reorder enum #
Total comments: 2
Patch Set 6 : Indentation style, missing semicolon #
Total comments: 1
Patch Set 7 : Fix formatting nit #Patch Set 8 : Make test stricter #Patch Set 9 : Make test stricter #Patch Set 10 : Disallow WritePlatformFile() for PLATFORM_FILE_APPEND #Patch Set 11 : Ignore write offset when PLATFORM_FILE_APPEND. #
Messages
Total messages: 19 (0 generated)
|