Begin implementation of tree operations.

This commit is contained in:
Vreixo Formoso
2007-12-06 02:11:05 +01:00
parent 8e7fe9b5a5
commit f62c34776f
5 changed files with 270 additions and 0 deletions

View File

@ -419,6 +419,25 @@ int iso_dir_iter_remove(IsoDirIter *iter)
return iso_node_remove(pos);
}
/**
* Get the destination of a node (in UTF-8).
* The returned string belongs to the node and should not be modified nor
* freed. Use strdup if you really need your own copy.
*/
const char *iso_symlink_get_dest(const IsoSymlink *link)
{
return link->dest;
}
/**
* Set the destination of a link.
*/
void iso_symlink_set_dest(IsoSymlink *link, const char *dest)
{
free(link->dest);
link->dest = strdup(dest);
}
int iso_node_new_root(IsoDir **root)
{
IsoDir *dir;