ea_filesystem.hpp File Reference

filesystem dependent Extended Attributes operations More...

#include "../my_config.h"
#include <string>
#include "ea.hpp"
#include "mask.hpp"

Go to the source code of this file.

Namespaces

namespace  libdar

Functions

void ea_filesystem_read_ea (const std::string &chemin, ea_attributs &val, const mask &filter)
 read EA associated to a given file
bool ea_filesystem_write_ea (const std::string &chemin, const ea_attributs &val, const mask &filter)
 overwrite some attribute to a given file's attribute list
void ea_filesystem_clear_ea (const std::string &name, const mask &filter)
 remove all EA of a given file that match a given mask
bool ea_filesystem_has_ea (const std::string &name)
 test the presence of EA for a given file
bool ea_filesystem_has_ea (const std::string &name, const ea_attributs &list, const mask &filter)
 test the presence of EA for a given file


Detailed Description

filesystem dependent Extended Attributes operations

This file contains a set of routines used to manipulate (read, write or test the presence of) Extended Attributes

Definition in file ea_filesystem.hpp.


Function Documentation

void libdar::ea_filesystem_clear_ea const std::string &  name,
const mask &  filter
 

remove all EA of a given file that match a given mask

Parameters:
[in] name is the filename which EA must be altered
[in] filter is a mask that defines which EA names have to be removed
Note:
unless the given mask is logically equivalent to bool_mask(true) some EA may remain associated to the file after the operation.

bool libdar::ea_filesystem_has_ea const std::string &  name,
const ea_attributs &  list,
const mask &  filter
 

test the presence of EA for a given file

Parameters:
[in] name is the filename which EA presence must be check against
[in] list list of attributes
[in] filter 
Returns:
true if at least one EA covered by filter and present in the list exists as EA of the given file

bool libdar::ea_filesystem_has_ea const std::string &  name  ) 
 

test the presence of EA for a given file

Parameters:
[in] name is the filename which EA presence must be check against
Returns:
true if at least one EA has been found

void libdar::ea_filesystem_read_ea const std::string &  chemin,
ea_attributs &  val,
const mask &  filter
 

read EA associated to a given file

Parameters:
[in] chemin is the path to the file to read attributes of
[out] val is the resulting list of EA associated to this file
[in] filter is a mask that defines which attributes names have to be considered only
Returns:
true whether some attribute could be found

bool libdar::ea_filesystem_write_ea const std::string &  chemin,
const ea_attributs &  val,
const mask &  filter
 

overwrite some attribute to a given file's attribute list

Parameters:
[in] chemin is the path of the file to write attribute to
[in] val is a list of attribute amoung which a subset will be added to file's attribute list
[in] filter a mask that define which attribute's names will be written and which will be ignored from the given list
Returns:
true if some attribute could be set
Note:
if an EA is already present, it is not modified unless the mask covers its name and a value is available for that attribute name in the given list.


Generated on Sun Oct 8 11:08:24 2006 for Disk ARchive by  doxygen 1.4.2