1
0
mirror of git://git.suckless.org/sbase synced 2024-12-25 00:12:42 +00:00
sbase/util/rm.c

19 lines
316 B
C
Raw Normal View History

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