diff options
author | Stefan Hoffmann <stefan991@gmail.com> | 2014-04-01 20:44:20 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-03 10:30:03 -0300 |
commit | db92e0b0945fc71ebd6c4620836c3a8d900443f4 (patch) | |
tree | 66e1cb526e0368970db5e65c9efd28dda418b1f9 /src | |
parent | fa2b327e9ac5f9554781960a5bb613840d95cafc (diff) | |
download | rneovim-db92e0b0945fc71ebd6c4620836c3a8d900443f4.tar.gz rneovim-db92e0b0945fc71ebd6c4620836c3a8d900443f4.tar.bz2 rneovim-db92e0b0945fc71ebd6c4620836c3a8d900443f4.zip |
added doxygen documentation for os_file_is_{readonly, writable}
Diffstat (limited to 'src')
-rw-r--r-- | src/os/fs.c | 3 | ||||
-rw-r--r-- | src/os/os.h | 14 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/os/fs.c b/src/os/fs.c index fdf9d0795e..84e31502ab 100644 --- a/src/os/fs.c +++ b/src/os/fs.c @@ -278,7 +278,6 @@ int os_file_exists(const char_u *name) } } -// return TRUE if a file appears to be read-only from the file permissions. int os_file_is_readonly(const char *name) { if (access(name, W_OK) == 0) { @@ -288,8 +287,6 @@ int os_file_is_readonly(const char *name) } } -// return 0 for not writable, 1 for writable file, 2 for a dir which we have -// rights to write into. int os_file_is_writable(const char *name) { if (access(name, W_OK) == 0) { diff --git a/src/os/os.h b/src/os/os.h index 8999d1480b..452c053868 100644 --- a/src/os/os.h +++ b/src/os/os.h @@ -60,6 +60,18 @@ int os_setperm(const char_u *name, int perm); /// @return `TRUE` if `name` exists. int os_file_exists(const char_u *name); +/// Check if a file is readonly. +/// +/// @return `True` if `name` is readonly. +int os_file_is_readonly(const char *name); + +/// Check if a file is writable. +/// +/// @return `0` if `name` is not writable, +/// @return `1` if `name` is writable, +/// @return `2` for a directory which we have rights to write into. +int os_file_is_writable(const char *name); + long_u os_total_mem(int special); const char *os_getenv(const char *name); int os_setenv(const char *name, const char *value, int overwrite); @@ -68,7 +80,5 @@ int os_get_usernames(garray_T *usernames); int os_get_user_name(char *s, size_t len); int os_get_uname(uid_t uid, char *s, size_t len); char *os_get_user_directory(const char *name); -int os_file_is_readonly(const char *name); -int os_file_is_writable(const char *name); #endif // NEOVIM_OS_OS_H |