diff options
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/rc-misc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c index a06ff088..27397d71 100644 --- a/src/rc/rc-misc.c +++ b/src/rc/rc-misc.c @@ -331,3 +331,12 @@ parse_mode(mode_t *mode, char *text) errno = EINVAL; return -1; } + +int +is_writable(const char *path) +{ + if (access(path, W_OK) == 0) + return 1; + + return 0; +} |