Content-type: text/html
delproplist, fdelproplist - Removes Extended File Attributes from a file
#include <sys/proplist.h>
int delproplist (
char *path,
int follow,
struct proplistname_args *args );
int fdelproplist (
int fd,
struct proplistname_args *args );
Contains system-wide Extended File Attributes.
Contains the number of
Extended File Attributes
names
held
in the names array,
pl_names.
pl_names
Contains a counted array of Extended File Attribute names.
The delproplist function removes one or more Extended File Attributes, whose names are specified in the structure pointed to by *args, from the Property List of the file pointed to by *path. An Extended File Attribute is a name and value pair that is contained in a variable-sized structure called a Property List. A Property List is part of a file's metadata and can contain abstract name and value pairs (Extended File Attributes) that can be set either by the operating system (for example, ACLs and privileges) or by a user-level application (for example, PC File Attributes). Note that if you specify a non-existent Extended File Attribute name, the function will return successfully.
The fdelproplist function behaves the same as delproplist, except that it operates on a file descriptor rather than a pointer to a file.
If a system failure occurs when the Extended File Attributes are being removed from disk, one of the three following conditions may apply to each Extended File Attribute, since there are no ordering guarantees when several Extended File Attributes are being updated: The Extended File Attribute was not removed from the disk. The Extended File Attribute was removed from the disk.
#include <sys/proplist.h>
main()
{
char *ptr, *buf, *name, *value;
int *value_len, *flags, buffer_size, min_buffer_size, ret, nbytes;
struct proplistname_args entry_names;
static char *names[] = {
"primary_name",
"secondary_name",
""
};
.
.
.
/*
* Delete the property list entries
*/
if (delproplist("/tmp/foo", 1, entry_names))
perror("delproplist");
free(buf);
}
If successful, zero is returned, the specified Extended File Attribute is deleted from disk, and the change time of the file pointed to by *path is marked for update.
If unsuccessful, the integer -1 is returned and errno is set to indicate the error.
In addition to errors associated with open(2), the function will fail if: Search permission was denied for a directory in *path.
Functions: open(2), add_proplist_entry(3), delproplist(3), fdelproplist(3), fgetproplist(3), fsetproplist(3), get_proplist_entry(3), getproplist(3), setproplist(3), sizeof_proplist_entry(3).
Files: proplist(4), sys/proplist.h.
delim off