Implemented functionality to exclude path

trunk@386
Mario Danic 17 years ago
parent 754a6eb601
commit 11d1b9bbb6

@ -75,7 +75,11 @@ libisofs_libisofs_la_SOURCES = \
libisofs/rockridge.h \
libisofs/rockridge.c \
libisofs/joliet.c \
libisofs/joliet.h
libisofs/joliet.h \
libisofs/exclude.c \
libisofs/exclude.h \
libisofs/hash.h \
libisofs/hash.c
libinclude_HEADERS = \
libburn/libburn.h \

@ -117,6 +117,26 @@ struct iso_tree_node *iso_tree_add_node(struct iso_tree_node *parent,
struct iso_tree_node *iso_tree_radd_dir(struct iso_tree_node *parent,
const char *path);
/**
* Add the path of a file or directory to ignore when adding a directory recursively.
*
* \param path The path, on the local filesystem, of the file.
*/
void iso_exclude_add_path(const char *path);
/**
* Remove a path that was set to be ignored when adding a directory recusively.
*
* \param path The path, on the local filesystem, of the file.
*/
void iso_exclude_remove_path(const char *path);
/**
* Remove all paths that were set to be ignored when adding a directory recusively.
*/
void iso_exclude_empty(void);
/**
* Creates a new, empty directory on the volume.
*

@ -22,6 +22,7 @@
#include "tree.h"
#include "util.h"
#include "volume.h"
#include "exclude.h"
static void
set_default_stat(struct stat *s)
@ -157,6 +158,11 @@ iso_tree_radd_dir (struct iso_tree_node *parent, const char *path)
continue;
sprintf(child, "%s/%s", path, ent->d_name);
/* see if this child is excluded. */
if (iso_exclude_lookup(child))
continue;
iso_tree_radd_dir(new, child);
}
closedir(dir);

Loading…
Cancel
Save