Added getters/setters from IsoNode permissions and owners.

This commit is contained in:
Vreixo Formoso
2007-11-27 20:41:09 +01:00
parent b9152421f3
commit efff783602
3 changed files with 133 additions and 2 deletions

View File

@ -8,8 +8,11 @@
#ifndef LIBISO_LIBISOFS_H_
#define LIBISO_LIBISOFS_H_
#include <sys/stat.h>
typedef struct Iso_Node IsoNode;
typedef struct Iso_Dir IsoDir;
typedef struct Iso_Symlink IsoSymlink;
/**
* Increments the reference counting of the given node.
@ -35,6 +38,50 @@ void iso_node_set_name(IsoNode *node, const char *name);
* 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_node_get_name(IsoNode *node);
const char *iso_node_get_name(const IsoNode *node);
/**
* 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_node_set_permissions(IsoNode *node, mode_t mode);
/**
* Get the permissions for the node
*/
mode_t iso_node_get_permissions(const IsoNode *node);
/**
* Get the mode of the node, both permissions and file type, as specified in
* 'man 2 stat'.
*/
mode_t iso_node_get_mode(const IsoNode *node);
/**
* Set the user id for the node. This attribute is only useful when
* Rock Ridge extensions are enabled.
*/
void iso_node_set_uid(IsoNode *node, uid_t uid);
/**
* Get the user id of the node.
*/
uid_t iso_node_get_uid(const IsoNode *node);
/**
* Set the group id for the node. This attribute is only useful when
* Rock Ridge extensions are enabled.
*/
void iso_node_set_gid(IsoNode *node, gid_t gid);
/**
* Get the group id of the node.
*/
gid_t iso_node_get_gid(const IsoNode *node);
#endif /*LIBISO_LIBISOFS_H_*/