xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
XrdSysFAttr Class Reference

#include <XrdSysFAttr.hh>

Inheritance diagram for XrdSysFAttr:
Inheritance graph
[legend]
Collaboration diagram for XrdSysFAttr:
Collaboration graph
[legend]

Public Member Functions

 XrdSysFAttr ()
 Constructor & Destructor.
 
 ~XrdSysFAttr ()
 
- Public Member Functions inherited from XrdSysXAttr
virtual int Copy (const char *iPath, int iFD, const char *oPath, int oFD, const char *Aname=0)
 
virtual XrdSysErrorSetMsgRoute (XrdSysError *errP)
 
 XrdSysXAttr ()
 Constructor and Destructor.
 
virtual ~XrdSysXAttr ()
 

Static Public Member Functions

static void SetPlugin (XrdSysXAttr *xaP, bool push=false)
 

Static Public Attributes

static XrdSysXAttrXat
 

Private Member Functions

int Del (const char *Aname, const char *Path, int fd=-1)
 The following methods are inherited from the base class as private methods.
 
void Free (AList *aPL)
 
int Get (const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)
 
int List (AList **aPL, const char *Path, int fd=-1, int getSz=0)
 
int Set (const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)
 
int Diagnose (const char *Op, const char *Var, const char *Path, int ec)
 
AListgetEnt (const char *Path, int fd, const char *Aname, AList *aP, int *msP)
 

Additional Inherited Members

- Protected Attributes inherited from XrdSysXAttr
XrdSysErrorSay
 

Detailed Description

This class provides an internal interface to handle extended file attributes either via a default implementation or an external plugin.

Constructor & Destructor Documentation

◆ XrdSysFAttr()

XrdSysFAttr::XrdSysFAttr ( )
inline

Constructor & Destructor.

◆ ~XrdSysFAttr()

XrdSysFAttr::~XrdSysFAttr ( )
inline

Member Function Documentation

◆ Del()

int XrdSysFAttr::Del ( const char *  Aname,
const char *  Path,
int  fd = -1 
)
privatevirtual

The following methods are inherited from the base class as private methods.

Implements XrdSysXAttr.

◆ Diagnose()

int XrdSysFAttr::Diagnose ( const char *  Op,
const char *  Var,
const char *  Path,
int  ec 
)
private

◆ Free()

void XrdSysFAttr::Free ( AList aPL)
privatevirtual

Release storage occupied by the Alist structure returned by List().

Parameters
aPL-> The first element of the AList structure.

Implements XrdSysXAttr.

◆ Get()

int XrdSysFAttr::Get ( const char *  Aname,
void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1 
)
privatevirtual

Get an attribute value and its size.

Parameters
Aname-> The attribute name.
Aval-> Buffer to receive the attribute value.
AvszLength of the buffer in bytes. Only up to this number of bytes should be returned. However, should Avsz be zero the the size of the attribute value should be returned and the Aval argument should be ignored.
Path-> Path of the file whose attribute is to be fetched.
fd-> If >=0 is the file descriptor of the opened subject file.
Returns
>0 The number of bytes placed in Aval. However, if avsz is zero then the value is the actual size of the attribute value.
=0 The attribute exists but has no associated value.
<0 The attribute value could not be returned. The returned value is -errno describing the reason.

Implements XrdSysXAttr.

◆ getEnt()

AList * XrdSysFAttr::getEnt ( const char *  Path,
int  fd,
const char *  Aname,
AList aP,
int *  msP 
)
private

◆ List()

int XrdSysFAttr::List ( AList **  aPL,
const char *  Path,
int  fd = -1,
int  getSz = 0 
)
privatevirtual

Get all of the attributes associated with a file.

Parameters
aPL-> the pointer to hold the first element of AList. The storage occupied by the returned AList must be released by calling Free().
Path-> Path of the file whose attributes are t be returned.
fd-> If >=0 is the file descriptor of the opened subject file.
getSzWhen != 0 then the size of the maximum attribute value should be returned. Otherwise, upon success 0 is returned.
Returns
>0 Attributes were returned and aPL points to the first attribute value. The returned value is the largest size of an attribute value encountered (getSz != 0).
=0 Attributes were returned and aPL points to the first attribute value (getSz == 0).
<0 The attribute values could not be returned. The returned value is -errno describing the reason.

Implements XrdSysXAttr.

◆ Set()

int XrdSysFAttr::Set ( const char *  Aname,
const void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1,
int  isNew = 0 
)
privatevirtual

Set an attribute.

Parameters
Aname-> The attribute name.
Aval-> Buffer holding the attribute value.
AvszLength of the buffer in bytes. This is the length of the attribute value which may contain binary data.
Path-> Path of the file whose attribute is to be set.
fd-> If >=0 is the file descriptor of the opened subject file.
isNewWhen !0 then the attribute must not exist (i.e. new). Otherwise, if it does exist, the value is replaced. In either case, if it does not exist it should be created.
Returns
=0 The attribute was successfully set.
<0 The attribute values could not be set. The returned value is -errno describing the reason.

Implements XrdSysXAttr.

◆ SetPlugin()

static void XrdSysFAttr::SetPlugin ( XrdSysXAttr xaP,
bool  push = false 
)
static

Establish a plugin that is to replace the builtin extended attribute processing methods.

Parameters
xaP-> To an instance of an XrdSysXAttr object that is to replace the builtin object that processes extended attributes;
pushTrue if this is a push request not a replace request. Push requests keep the current attribute processor.

Member Data Documentation

◆ Xat

XrdSysXAttr* XrdSysFAttr::Xat
static

Xat points to the plugin to be used for all operations. The methods inherited from XrdSysXAttr cannot be directly invoked. Instead, use XrdSysFAttr::Xat-><any XrdSysXAttr public method>. All static methods here, however, can be directly invoked.

Referenced by XrdOucXAttr< T >::Del(), XrdOucXAttr< T >::Get(), and XrdOucXAttr< T >::Set().


The documentation for this class was generated from the following file: