1#ifndef NVIM_OS_FS_DEFS_H
2#define NVIM_OS_FS_DEFS_H
3
4#include <uv.h>
5
6/// Struct which encapsulates stat information.
7typedef struct {
8 uv_stat_t stat; ///< @private
9} FileInfo;
10
11/// Struct which encapsulates inode/dev_id information.
12typedef struct {
13 uint64_t inode; ///< @private The inode of the file
14 uint64_t device_id; ///< @private The id of the device containing the file
15} FileID;
16
17#define FILE_ID_EMPTY (FileID) { .inode = 0, .device_id = 0 }
18
19typedef struct {
20 uv_fs_t request; ///< @private The request to uv for the directory.
21 uv_dirent_t ent; ///< @private The entry information.
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
31