#include <XrdPosixDir.hh>
Definition at line 48 of file XrdPosixDir.hh.
◆ XrdPosixDir()
XrdPosixDir::XrdPosixDir |
( |
const char * |
path | ) |
|
|
inline |
Definition at line 51 of file XrdPosixDir.hh.
52 : DAdmin(path,
ecMsg), myDirVec(0), myDirEnt(0),
53 nxtEnt(0), numEnt(0), eNum(0)
◆ ~XrdPosixDir()
XrdPosixDir::~XrdPosixDir |
( |
| ) |
|
|
inline |
◆ dirNo()
static int XrdPosixDir::dirNo |
( |
DIR * |
dirP | ) |
|
|
inlinestatic |
◆ getEntries()
long XrdPosixDir::getEntries |
( |
| ) |
|
|
inline |
◆ getOffset()
long XrdPosixDir::getOffset |
( |
| ) |
|
|
inline |
◆ nextEntry()
dirent64 * XrdPosixDir::nextEntry |
( |
dirent64 * |
dp = 0 | ) |
|
Definition at line 48 of file XrdPosixDir.cc.
52 const int dirhdrln = dp->d_name - (
char *)dp;
57 if (!myDirVec && !
Open()) {eNum = errno;
return 0;}
61 if (nxtEnt >= numEnt) {eNum = 0;
return 0;}
65 dirEnt = myDirVec->
At(nxtEnt);
66 d_name = dirEnt->
GetName().c_str();
67 d_nlen = dirEnt->
GetName().length();
71 if (!dp) dp = myDirEnt;
76 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
77 dp->d_fileno = nxtEnt;
78 dp->d_namlen = d_nlen;
83 dp->d_reclen = d_nlen + dirhdrln;
84 strncpy(dp->d_name, d_name, d_nlen);
85 dp->d_name[d_nlen] =
'\0';
const std::string & GetName() const
Get file name.
ListEntry * At(uint32_t index)
Get an entry at given index.
static const size_t maxDlen
References XrdCl::DirectoryList::At(), XrdCl::DirectoryList::ListEntry::GetName(), maxDlen, and Open().
Referenced by XrdPosixXrootd::Readdir64(), and XrdPosixXrootd::Readdir64_r().
◆ Open()
DIR * XrdPosixDir::Open |
( |
| ) |
|
Definition at line 94 of file XrdPosixDir.cc.
96 static const size_t dEntSize =
sizeof(dirent64) +
maxDlen + 1;
102 if (!myDirEnt && !(myDirEnt = (dirent64 *)malloc(dEntSize)))
111 myDirVec, (uint16_t)0),
ecMsg);
115 if (rc)
return (DIR *)0;
120 return (DIR *)&
fdNum;
uint32_t GetSize() const
Get the size of the listing.
XRootDStatus DirList(const std::string &path, DirListFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
std::string GetPathWithParams() const
Get the path with params.
int SetErrno(int ecc, int retval=-1, const char *alt=0)
static int Result(const XrdCl::XRootDStatus &Status, XrdOucECMsg &ecMsg, bool retneg1=false)
XrdCl::DirListFlags::Flags dlFlag
References XrdCl::FileSystem::DirList(), XrdPosixGlobals::dlFlag, XrdPosixObject::ecMsg, XrdPosixObject::fdNum, XrdCl::URL::GetPathWithParams(), XrdCl::DirectoryList::GetSize(), maxDlen, XrdPosixMap::Result(), XrdOucECMsg::SetErrno(), XrdPosixAdmin::Url, and XrdPosixAdmin::Xrd.
Referenced by nextEntry(), XrdPosixXrootd::Opendir(), and XrdPosixXrootd::Seekdir().
◆ rewind()
void XrdPosixDir::rewind |
( |
| ) |
|
|
inline |
◆ setOffset()
void XrdPosixDir::setOffset |
( |
long |
offset | ) |
|
|
inline |
◆ Status()
int XrdPosixDir::Status |
( |
| ) |
|
|
inline |
◆ Unread()
bool XrdPosixDir::Unread |
( |
| ) |
|
|
inline |
◆ Who() [1/3]
virtual bool XrdPosixObject::Who |
|
inline |
◆ Who() [2/3]
◆ Who() [3/3]
virtual bool XrdPosixObject::Who |
|
inline |
◆ maxDlen
const size_t XrdPosixDir::maxDlen = 256 |
|
static |
The documentation for this class was generated from the following files: