Neovim Home
src
nvim
os
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
24
// Values returned by os_nodetype()
25
#define NODE_NORMAL 0 // file or directory, check with os_isdir()
26
#define NODE_WRITABLE 1 // something we can write to (character
27
// device, fifo, socket, ..)
28
#define NODE_OTHER 2 // non-writable thing (e.g., block device)
29
30
#endif // NVIM_OS_FS_DEFS_H
FileInfo
Struct which encapsulates stat information.
Definition:
fs_defs.h:7
Directory
Definition:
fs_defs.h:19
FileID
Struct which encapsulates inode/dev_id information.
Definition:
fs_defs.h:12