Data Structures | Enumerations
fileio.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include "nvim/func_attr.h"
#include "nvim/rbuffer.h"

Go to the source code of this file.

Data Structures

struct  FileDescriptor
 Structure used to read from/write to file. More...
 

Enumerations

enum  FileOpenFlags {
  kFileReadOnly = 1, kFileCreate = 2, kFileWriteOnly = 4, kFileNoSymlink = 8,
  kFileCreateOnly = 16, kFileTruncate = 32, kFileAppend = 64, kFileNonBlocking = 128
}
 file_open() flags More...
 
enum  { kRWBufferSize = 1024 }
 

Enumeration Type Documentation

anonymous enum
Enumerator
kRWBufferSize 

Read or write buffer size

Currently equal to (IOSIZE - 1), but they do not need to be connected.

file_open() flags

Enumerator
kFileReadOnly 

Open file read-only. Default.

kFileCreate 

Create file if it does not exist yet. Implies kFileWriteOnly.

kFileWriteOnly 

Open file for writing only. Cannot be used with kFileReadOnly.

kFileNoSymlink 

Do not allow symbolic links.

kFileCreateOnly 

Only create the file, failing if it already exists. Implies kFileWriteOnly. Cannot be used with kFileCreate.

kFileTruncate 

Truncate the file if it exists. Implies kFileWriteOnly. Cannot be used with kFileCreateOnly.

kFileAppend 

Append to the file. Implies kFileWriteOnly. Cannot be used with kFileCreateOnly.

kFileNonBlocking 

Do not restart read() or write() syscall if EAGAIN was encountered.