xrootd
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
XrdSfsDirectory Class Referenceabstract

#include <XrdSfsInterface.hh>

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

Public Member Functions

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

Public Attributes

XrdOucErrInfoerror
 

Private Attributes

XrdOucErrInfolclEI
 

Detailed Description

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

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.

References error, and lclEI.

◆ 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.

◆ 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.

◆ ~XrdSfsDirectory()

virtual XrdSfsDirectory::~XrdSfsDirectory ( )
inlinevirtual

Destructor.

References lclEI.

Member Function Documentation

◆ autoStat()

virtual 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 XrdDigDirectory, XrdOfsDirectory, and XrdSsiDir.

◆ close()

virtual int XrdSfsDirectory::close ( )
pure virtual

Close the directory.

Returns
One of SFS_OK or SFS_ERROR

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

◆ FName()

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

Get the directory path.

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

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

◆ 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 XrdBwmDirectory, XrdDigDirectory, XrdOfsDirectory, XrdSfsNativeDirectory, and XrdSsiDir.

◆ 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 XrdBwmDirectory, XrdOfsDirectory, and XrdSsiDir.

Member Data Documentation

◆ error

XrdOucErrInfo& XrdSfsDirectory::error

The error object is used to return details whenever something other than SFS_OK is returned from the methods in this class, when noted.

Referenced by XrdBwmDirectory::copyError(), XrdOfsDirectory::copyError(), XrdSsiDir::copyError(), and XrdSfsDirectory().

◆ lclEI

XrdOucErrInfo* XrdSfsDirectory::lclEI
private

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