Beispiel #1
0
static int purge_stale_dir(const char *path)
{
	char p[PATH_MAX];

	snprintf(p, PATH_MAX, "%s/.stale", path);
	return purge_dir(p);
}
Beispiel #2
0
	void purge_dir(tmp_dir *dir)
	{
		sc_dir_iterator *it = dir->search();
		for (;!it->is_over();it->next()) {
			tmp_dirent *dirent = dir->find(it->value());
			if (dirent->dir) {
				purge_dir(dirent->u.dir);
			}
			unlink(dirent->name);
		}
		delete it;
	}
Beispiel #3
0
	// we dont care here about history of alloc'ed memory, yet.
	~tmp_repo()
	{
		purge_dir(&root);
	}