diff options
Diffstat (limited to 'lib/lib.c')
-rw-r--r-- | lib/lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -178,6 +178,12 @@ void xaccess(char *path, int flags) if (access(path, flags)) perror_exit("Can't access '%s'\n", path); } +// Die unless we can delete a file. (File must exist to be deleted.) +void xunlink(char *path) +{ + if (unlink(path)) perror_exit("unlink '%s'", path); +} + // Die unless we can open/create a file, returning file descriptor. int xcreate(char *path, int flags, int mode) { |