Fixed obsolete lines, free joliet tree, added public functions

This commit is contained in:
Mario Danic
2007-06-02 08:24:58 +00:00
parent 44b504640f
commit 9746b5b273
8 changed files with 114 additions and 533 deletions

View File

@@ -12,6 +12,8 @@
#ifndef LIBISO_LIBISOFS_H
#define LIBISO_LIBISOFS_H
#include <sys/types.h>
/* #include <libburn.h> */
struct burn_source;
@@ -45,6 +47,11 @@ enum ecma119_extension_flag {
ECMA119_JOLIET = (1<<1)
};
enum hide_node_flag {
LIBISO_HIDE_ON_RR = 1 << 0,
LIBISO_HIDE_ON_JOLIET = 1 << 1
};
/**
* This will hold the error code for some functions, if them fail.
*/
@@ -282,23 +289,6 @@ struct iso_tree_node *iso_tree_add_node(struct iso_tree_node_dir *parent,
struct iso_tree_node_dir *iso_tree_radd_dir(struct iso_tree_node_dir *parent,
const char *path, struct iso_tree_radd_dir_behavior *behavior);
//struct iso_tree_node *iso_tree_radd_dir(struct iso_tree_node *parent,
// const char *path);
/**
* Creates a new, empty directory on the volume.
*
* \pre \p parent is NULL or is a directory.
* \pre \p name is unique among the children and files belonging to \p parent.
* Also, it doesn't contain '/' characters.
*
* \post \p parent contains a child directory whose name is \p name and whose
* POSIX attributes are the same as \p parent's.
* \return a pointer to the newly created directory.
*/
/*struct iso_tree_node *iso_tree_add_new_dir(struct iso_tree_node *parent,
const char *name);*/
/**
* Set the name of a tree node (using the current locale).
*/
@@ -306,9 +296,56 @@ void iso_tree_node_set_name(struct iso_tree_node *node, const char *name);
/**
* Set if the node will be hidden in RR/ISO tree, Joliet tree or both.
*
* If the file is setted as hidden in one tree, it won't be included there, so
* it won't be visible in a OS accessing CD using that tree. For example,
* GNU/Linux systems access to Rock Ridge / ISO9960 tree in order to see
* what is recorded on CD, while MS Windows make use of the Joliet tree. If a
* file is hidden only in Joliet, it won't be visible in Windows systems,
* while still visible in Linux.
*
* If a file is hidden in both trees, it won't be written to image.
*
* \param node The node that is to be hidden.
* \param hide_attrs hide_node_flag's to set the trees in which file
* will be hidden.
*/
void iso_tree_node_set_hidden(struct iso_tree_node *node, int hide_attrs);
/**
* Set the group id for the node. This attribute is only useful when
* Rock Ridge extensions are enabled.
*/
void iso_tree_node_set_gid(struct iso_tree_node *node, gid_t gid);
/**
* Set the user id for the node. This attribute is only useful when
* Rock Ridge extensions are enabled.
*/
void iso_tree_node_set_uid(struct iso_tree_node *node, uid_t uid);
/**
* Set the permissions for the node. This attribute is only useful when
* Rock Ridge extensions are enabled.
*
* \param mode bitmask with the permissions of the node, as specified
* in 'man 2 stat'. The file type bitfields will be ignored,
* only file permissions will be modified.
*/
void iso_tree_node_set_permissions(struct iso_tree_node *node, mode_t mode);
/**
* Sets the order in which a node will be written on image. High weihted files
* will be written first, so in a disc them will be written near the center.
*
* \param node The node which weight will be changed. If it's a dir, this
* function will change the weight of all its children. For nodes
* other that dirs or regular files, this function has no effect.
* \param w The weight as a integer number, the greater this value is, the
* closer from the begining of image the file will be written.
*/
void iso_tree_node_set_sort_weight(struct iso_tree_node *node, int w);
/**
* Recursively print a directory to stdout.
* \param spaces The initial number of spaces on the left. Set to 0 if you