1#ifndef DEFINE_FUNC_ATTRIBUTES
2# define DEFINE_FUNC_ATTRIBUTES
3#endif
4#include "nvim/func_attr.h"
5#undef DEFINE_FUNC_ATTRIBUTES
6void fs_init(void);
7int os_chdir(const char *path) FUNC_ATTR_NONNULL_ALL;
8int os_dirname(char_u *buf, size_t len) FUNC_ATTR_NONNULL_ALL;
9_Bool os_isrealdir(const char *name) FUNC_ATTR_NONNULL_ALL;
10_Bool os_isdir(const char_u *name) FUNC_ATTR_NONNULL_ALL;
11_Bool os_isdir_executable(const char *name) FUNC_ATTR_NONNULL_ALL;
12int os_nodetype(const char *name) FUNC_ATTR_NONNULL_ALL;
13int os_exepath(char *buffer, size_t *size) FUNC_ATTR_NONNULL_ALL;
14_Bool os_can_exe(const char *name, char **abspath, _Bool use_path) FUNC_ATTR_NONNULL_ARG(1);
15int os_open(const char *path, int flags, int mode);
16FILE *os_fopen(const char *path, const char *flags);
17int os_set_cloexec(const int fd);
18int os_close(const int fd);
19int os_dup(const int fd) FUNC_ATTR_WARN_UNUSED_RESULT;
20ptrdiff_t os_read(const int fd, _Bool *const ret_eof, char *const ret_buf, const size_t size, const _Bool non_blocking) FUNC_ATTR_WARN_UNUSED_RESULT;
21ptrdiff_t os_readv(const int fd, _Bool *const ret_eof, struct iovec *iov, size_t iov_size, const _Bool non_blocking) FUNC_ATTR_NONNULL_ALL;
22ptrdiff_t os_write(const int fd, const char *const buf, const size_t size, const _Bool non_blocking) FUNC_ATTR_WARN_UNUSED_RESULT;
23int os_copy(const char *path, const char *new_path, int flags);
24int os_fsync(int fd);
25int32_t os_getperm(const char *name);
26int os_setperm(const char *const name, int perm) FUNC_ATTR_NONNULL_ALL;
27int os_chown(const char *path, uv_uid_t owner, uv_gid_t group);
28int os_fchown(int fd, uv_uid_t owner, uv_gid_t group);
29_Bool os_path_exists(const char_u *path);
30int os_file_settime(const char *path, double atime, double mtime);
31_Bool os_file_is_readable(const char *name) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT;
32int os_file_is_writable(const char *name) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT;
33int os_rename(const char_u *path, const char_u *new_path) FUNC_ATTR_NONNULL_ALL;
34int os_mkdir(const char *path, int32_t mode) FUNC_ATTR_NONNULL_ALL;
35int os_mkdir_recurse(const char *const dir, int32_t mode, char **const failed_dir) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT;
36int os_mkdtemp(const char *template, char *path) FUNC_ATTR_NONNULL_ALL;
37int os_rmdir(const char *path) FUNC_ATTR_NONNULL_ALL;
38_Bool os_scandir(Directory *dir, const char *path) FUNC_ATTR_NONNULL_ALL;
39const char *os_scandir_next(Directory *dir) FUNC_ATTR_NONNULL_ALL;
40void os_closedir(Directory *dir) FUNC_ATTR_NONNULL_ALL;
41int os_remove(const char *path) FUNC_ATTR_NONNULL_ALL;
42_Bool os_fileinfo(const char *path, FileInfo *file_info) FUNC_ATTR_NONNULL_ARG(2);
43_Bool os_fileinfo_link(const char *path, FileInfo *file_info) FUNC_ATTR_NONNULL_ARG(2);
44_Bool os_fileinfo_fd(int file_descriptor, FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
45_Bool os_fileinfo_id_equal(const FileInfo *file_info_1, const FileInfo *file_info_2) FUNC_ATTR_NONNULL_ALL;
46void os_fileinfo_id(const FileInfo *file_info, FileID *file_id) FUNC_ATTR_NONNULL_ALL;
47uint64_t os_fileinfo_inode(const FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
48uint64_t os_fileinfo_size(const FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
49uint64_t os_fileinfo_hardlinks(const FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
50uint64_t os_fileinfo_blocksize(const FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
51_Bool os_fileid(const char *path, FileID *file_id) FUNC_ATTR_NONNULL_ALL;
52_Bool os_fileid_equal(const FileID *file_id_1, const FileID *file_id_2) FUNC_ATTR_NONNULL_ALL;
53_Bool os_fileid_equal_fileinfo(const FileID *file_id, const FileInfo *file_info) FUNC_ATTR_NONNULL_ALL;
54#include "nvim/func_attr.h"
55