Add function to add an exiting file to the iso tree.

Node is created using a builder. Default builder and filesystem is added 
to IsoImage. Later we should expose setters for this atts.
This commit is contained in:
Vreixo Formoso
2007-12-07 03:02:46 +01:00
parent c93fa154d5
commit 45f4d0a29e
5 changed files with 221 additions and 7 deletions

View File

@ -573,6 +573,35 @@ int iso_tree_add_new_symlink(IsoDir *parent, const char *name,
int iso_tree_add_new_special(IsoDir *parent, const char *name, mode_t mode,
dev_t dev, IsoSpecial **special);
/**
* Add a new node to the image tree, from an existing file.
*
* TODO comment Builder and Filesystem related issues when exposing both
*
* All attributes will be taken from the source file. The appropriate file
* type will be created.
*
* @param image
* The image
* @param parent
* The directory in the image tree where the node will be added.
* @param path
* The path of the file to add in the filesystem.
* @param node
* place where to store a pointer to the newly added file. No
* extra ref is addded, so you will need to call iso_node_ref() if you
* really need it. You can pass NULL in this parameter if you don't need
* the pointer.
* @return
* number of nodes in parent if success, < 0 otherwise
* Possible errors:
* ISO_NULL_POINTER, if image, parent or path are NULL
* ISO_NODE_NAME_NOT_UNIQUE, a node with same name already exists
* ISO_MEM_ERROR
*/
int iso_tree_add_node(IsoImage *image, IsoDir *parent, const char *path,
IsoNode **node);
#define ISO_MSGS_MESSAGE_LEN 4096
/**