35 #include <sys/types.h>
45 const char *XrdCpFile::mPfx = 0;
53 static struct proto {
const char *pHdr;
int pHsz;
PType pVal;}
54 pTab[] = {{
"xroot://", 8,
isXroot},
62 static int pTnum =
sizeof(pTab)/
sizeof(
struct proto);
79 while(i)
if (
Path[i-1] !=
'/' || (i > 1 &&
Path[i-2] !=
'/'))
break;
84 if (!strcmp(
Path,
"-"))
91 for (i = 0; i < pTnum; i++)
92 {
if (!strncmp(FSpec, pTab[i].pHdr, pTab[i].pHsz))
94 memcpy(
ProtName, pTab[i].pHdr, pTab[i].pHsz-3);
102 if (!strncmp(
Path,
"file://", 7))
103 {
char *pP =
Path + 7;
104 if (!strncmp(pP,
"localhost", 9)) memmove(
Path, pP + 9, strlen( pP + 9 ) + 1 );
105 else if (*pP ==
'/') memmove(
Path, pP, strlen( pP ) + 1 );
120 : Next(0),
Path(FSpec), Doff(doff), Dlen(dlen),
134 short dlen, doff = strlen(
Path);
138 while((nP = nsObj.
Index(rc)) && rc == 0)
139 {
do {dlen = nP->
Plen - doff;
141 nFile++; nBytes += nP->
Stat.st_size; nP->
Path = 0;
142 pP->
Next = fP; pP = fP;
143 nnP = nP->
Next;
delete nP;
147 if (pLast) *pLast = pP;
165 char *cgibeg = strchr(
Path,
'?' );
166 if( cgibeg ) *cgibeg =
'\0';
168 if( cgibeg ) *cgibeg =
'?';
int stat(const char *path, struct stat *buf)
int Extend(XrdCpFile **pLast, int &nFile, long long &nBytes)
void setMsgOn(const char *pfx)
NSEnt * Index(int &rc, const char **dPath=0)
ProtocolImpl< false > Protocol