1
0
mirror of git://git.suckless.org/sbase synced 2024-12-25 08:22:44 +00:00
sbase/util/rm.c
2012-01-30 22:41:33 +00:00

18 lines
319 B
C

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