fs_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_OS_FS_DEFS_H
2 #define NVIM_OS_FS_DEFS_H
3 
4 #include <uv.h>
5 
7 typedef struct {
8  uv_stat_t stat;
9 } FileInfo;
10 
12 typedef struct {
13  uint64_t inode;
14  uint64_t device_id;
15 } FileID;
16 
17 #define FILE_ID_EMPTY (FileID) { .inode = 0, .device_id = 0 }
18 
19 typedef struct {
20  uv_fs_t request;
21  uv_dirent_t ent;
22 } Directory;
23 
27 #define os_strerror uv_strerror
28 
29 // Values returned by os_nodetype()
30 #define NODE_NORMAL 0 // file or directory, check with os_isdir()
31 #define NODE_WRITABLE 1 // something we can write to (character
32  // device, fifo, socket, ..)
33 #define NODE_OTHER 2 // non-writable thing (e.g., block device)
34 
35 #endif // NVIM_OS_FS_DEFS_H
Struct which encapsulates inode/dev_id information.
Definition: fs_defs.h:12
Definition: fs_defs.h:19
Struct which encapsulates stat information.
Definition: fs_defs.h:7