2012-01-30 22:41:33 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
2013-03-05 20:46:48 +00:00
|
|
|
|
2012-01-30 22:41:33 +00:00
|
|
|
#include "../fs.h"
|
|
|
|
#include "../util.h"
|
|
|
|
|
2013-03-05 20:46:48 +00:00
|
|
|
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);
|
|
|
|
}
|
2013-03-05 20:46:48 +00:00
|
|
|
|