sbase/libutil/rm.c
2014-11-19 20:09:29 +00:00

18 lines
289 B
C

/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include "../fs.h"
#include "../util.h"
int rm_fflag = 0;
int rm_rflag = 0;
void
rm(const char *path)
{
if (rm_rflag)
recurse(path, rm);
if (remove(path) < 0 && !rm_fflag)
eprintf("remove %s:", path);
}