mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
os/fileio: Support appending to a file
This commit is contained in:
@@ -62,6 +62,8 @@ int file_open(FileDescriptor *const ret_fp, const char *const fname,
|
||||
FLAG(flags, kFileCreate, O_CREAT|O_WRONLY, kTrue, !(flags & kFileCreateOnly));
|
||||
FLAG(flags, kFileTruncate, O_TRUNC|O_WRONLY, kTrue,
|
||||
!(flags & kFileCreateOnly));
|
||||
FLAG(flags, kFileAppend, O_APPEND|O_WRONLY, kTrue,
|
||||
!(flags & kFileCreateOnly));
|
||||
FLAG(flags, kFileReadOnly, O_RDONLY, kFalse, wr != kTrue);
|
||||
#ifdef O_NOFOLLOW
|
||||
FLAG(flags, kFileNoSymlink, O_NOFOLLOW, kNone, true);
|
||||
|
Reference in New Issue
Block a user