XRootD
XrdSfsDirectory Class Referenceabstract

#include <XrdSfsInterface.hh>

+ Inheritance diagram for XrdSfsDirectory:
+ Collaboration diagram for XrdSfsDirectory:

Public Member Functions

 XrdSfsDirectory (const char *user=0, int MonID=0)
 
 XrdSfsDirectory (XrdOucErrInfo &eInfo)
 
 XrdSfsDirectory (XrdSfsDirectory &wrapD)
 
virtual ~XrdSfsDirectory ()
 Destructor. More...
 
virtual int autoStat (struct stat *buf)
 
virtual int close ()=0
 
virtual const char * FName ()=0
 
virtual const char * nextEntry ()=0
 
virtual int open (const char *path, const XrdSecEntity *client=0, const char *opaque=0)=0
 

Public Attributes

XrdOucErrInfoerror
 

Detailed Description

The XrdSfsDirectory object is returned by XrdSfsFileSystem::newFile() when the caller wants to be able to perform directory oriented operations.

Definition at line 243 of file XrdSfsInterface.hh.

Constructor & Destructor Documentation

◆ XrdSfsDirectory() [1/3]

XrdSfsDirectory::XrdSfsDirectory ( const char *  user = 0,
int  MonID = 0 
)
inline

Constructor (user and MonID are the ones passed to newDir()!). This constructor should only be used by base plugins. Plugins that wrap an SfsDirectory should use the second version of the constructor shown below.

Parameters
user- Text identifying the client responsible for this call. The pointer may be null if identification is missing.
MonID- The monitoring identifier assigned to this and all future requests using the returned object.

Definition at line 320 of file XrdSfsInterface.hh.

321  : error(*(new XrdOucErrInfo(user, MonID)))
322  {lclEI = &error;}
XrdOucErrInfo & error

References error.

◆ XrdSfsDirectory() [2/3]

XrdSfsDirectory::XrdSfsDirectory ( XrdSfsDirectory wrapD)
inline

Constructor for plugins that wrap another SfsDirectory. This constructor inherits the error object from a wrapped SfsDirectory object so that only one identical error object exists for all directory objects in the chain.

Parameters
wrapD- Reference to the directory object being wrapped.

Definition at line 332 of file XrdSfsInterface.hh.

333  : error(wrapD.error), lclEI(0) {}

◆ XrdSfsDirectory() [3/3]

XrdSfsDirectory::XrdSfsDirectory ( XrdOucErrInfo eInfo)
inline

Constructor for base plugins that predefined an error object. This is a convenience constructor for base plugins only.

Parameters
eInfo- Reference to the error object to use.

Definition at line 342 of file XrdSfsInterface.hh.

343  : error(eInfo), lclEI(0) {}

◆ ~XrdSfsDirectory()

virtual XrdSfsDirectory::~XrdSfsDirectory ( )
inlinevirtual

Destructor.

Definition at line 349 of file XrdSfsInterface.hh.

349 {if (lclEI) delete lclEI;}

Member Function Documentation

◆ autoStat()

int XrdSfsDirectory::autoStat ( struct stat buf)
virtual

Set the stat() buffer where stat information is to be placed corresponding to the directory entry returned by nextEntry().

Returns
If supported, SFS_OK should be returned. If not supported, then SFS_ERROR should be returned with error.code set to ENOTSUP.
Note
: When autoStat() is in effect, directory entries that have been deleted from the target directory are quietly skipped.

Reimplemented in XrdSsiDir, XrdOfsDirectory, and XrdDigDirectory.

Definition at line 46 of file XrdSfsInterface.cc.

47 {
48  (void)buf;
49  error.setErrInfo(ENOTSUP, "Not supported.");
50  return SFS_ERROR;
51 }
#define SFS_ERROR
int setErrInfo(int code, const char *emsg)

References error, XrdOucErrInfo::setErrInfo(), and SFS_ERROR.

+ Here is the call graph for this function:

◆ close()

virtual int XrdSfsDirectory::close ( )
pure virtual

Close the directory.

Returns
One of SFS_OK or SFS_ERROR

Implemented in XrdSsiDir, XrdSfsNativeDirectory, XrdOfsDirectory, XrdDigDirectory, and XrdBwmDirectory.

◆ FName()

virtual const char* XrdSfsDirectory::FName ( )
pure virtual

Get the directory path.

Returns
Null terminated string of the path used in open().

Implemented in XrdSsiDir, XrdSfsNativeDirectory, XrdOfsDirectory, XrdDigDirectory, and XrdBwmDirectory.

◆ nextEntry()

virtual const char* XrdSfsDirectory::nextEntry ( )
pure virtual

Get the next directory entry.

Returns
A null terminated string with the directory name. Normally, "." ".." are not returned. If a null pointer is returned then if this is due to an error, error.code should contain errno. Otherwise, error.code should contain zero to indicate that no more entries exist (i.e. end of list). See autoStat() for additional caveats.

Implemented in XrdSsiDir, XrdSfsNativeDirectory, XrdOfsDirectory, XrdDigDirectory, and XrdBwmDirectory.

◆ open()

virtual int XrdSfsDirectory::open ( const char *  path,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure virtual

Open a directory.

Parameters
path- Pointer to the path of the directory to be opened.
client- Client's identify (see common description).
opaque- path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, ir SFS_STALL

Implemented in XrdSsiDir, XrdOfsDirectory, and XrdBwmDirectory.

Member Data Documentation

◆ error


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