Implemented functionality to exclude path
This commit is contained in:
parent
2194687eb2
commit
898f3e5402
@ -75,7 +75,11 @@ libisofs_libisofs_la_SOURCES = \
|
|||||||
libisofs/rockridge.h \
|
libisofs/rockridge.h \
|
||||||
libisofs/rockridge.c \
|
libisofs/rockridge.c \
|
||||||
libisofs/joliet.c \
|
libisofs/joliet.c \
|
||||||
libisofs/joliet.h
|
libisofs/joliet.h \
|
||||||
|
libisofs/exclude.c \
|
||||||
|
libisofs/exclude.h \
|
||||||
|
libisofs/hash.h \
|
||||||
|
libisofs/hash.c
|
||||||
|
|
||||||
libinclude_HEADERS = \
|
libinclude_HEADERS = \
|
||||||
libburn/libburn.h \
|
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,
|
struct iso_tree_node *iso_tree_radd_dir(struct iso_tree_node *parent,
|
||||||
const char *path);
|
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.
|
* Creates a new, empty directory on the volume.
|
||||||
*
|
*
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
|
#include "exclude.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_default_stat(struct stat *s)
|
set_default_stat(struct stat *s)
|
||||||
@ -157,6 +158,11 @@ iso_tree_radd_dir (struct iso_tree_node *parent, const char *path)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
sprintf(child, "%s/%s", path, ent->d_name);
|
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);
|
iso_tree_radd_dir(new, child);
|
||||||
}
|
}
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user