Loading...
Searching...
No Matches
XrdW41Dirs Class Reference
Collaboration diagram for XrdW41Dirs:

## Static Public Member Functions

static XrdOucTList * | Expand (const char *Path, XrdOucTList *ptl)

## Detailed Description

Definition at line 86 of file XrdWait41.cc.

## Member Function Documentation

## Expand()

XrdOucTList * XrdW41Dirs::Expand | ( | const char * | Path,
|  | XrdOucTList * | ptl )

static

Definition at line 178 of file XrdWait41.cc.

{
struct dirent *dp;
struct stat Stat;
const char *eText;
char buff[1024], *sfxDir;
DIR *DFD;
if (!(DFD = opendir(Path)))
{eText = XrdSysE2T(errno);
std::cerr <<"wait41: " <<eText <<" opening directory" <<Path <<std::endl;
return ptl;
}
strcpy(buff, Path); sfxDir = buff + strlen(Path);
if (*(sfxDir-1) != '/') *sfxDir++ = '/';
errno = 0;
while((dp = readdir(DFD)))
{if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue;
strcpy(sfxDir, dp->d_name);
if (stat(buff, &Stat))
{eText = XrdSysE2T(errno);
std::cerr <<"wait41: " <<eText <<" processing " <<buff <<std::endl;
continue;
}
if (S_ISREG(Stat.st_mode)) ptl = new XrdOucTList(buff, 0, ptl);
errno = 0;
}
if (errno)
{eText = XrdSysE2T(errno);
std::cerr <<"wait41: " <<eText <<" reading directory" <<Path <<std::endl;
}
closedir(DFD);
return ptl;
}
Stat
struct stat Stat
Definition XrdCks.cc:49
opendir
#define opendir(a)
Definition XrdPosix.hh:78
closedir
#define closedir(a)
Definition XrdPosix.hh:50
stat
#define stat(a, b)
Definition XrdPosix.hh:101
readdir
#define readdir(a)
Definition XrdPosix.hh:86
Path
XrdOucString Path
Definition XrdSecpwdSrvAdmin.cc:160
XrdSysE2T
const char * XrdSysE2T(int errcode)
Definition XrdSysE2T.cc:104

References closedir, opendir, Path, readdir, Stat, stat, and XrdSysE2T().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

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

- XrdWait41.cc