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},
63 static int pTnum =
sizeof(pTab)/
sizeof(
struct proto);
80 while(i)
if (
Path[i-1] !=
'/' || (i > 1 &&
Path[i-2] !=
'/'))
break;
85 if (!strcmp(
Path,
"-"))
92 for (i = 0; i < pTnum; i++)
93 {
if (!strncmp(FSpec, pTab[i].pHdr, pTab[i].pHsz))
95 memcpy(
ProtName, pTab[i].pHdr, pTab[i].pHsz-3);
103 if (!strncmp(
Path,
"file://", 7))
104 {
char *pP =
Path + 7;
105 if (!strncmp(pP,
"localhost", 9)) memmove(
Path, pP + 9, strlen( pP + 9 ) + 1 );
106 else if (*pP ==
'/') memmove(
Path, pP, strlen( pP ) + 1 );
121 : Next(0),
Path(FSpec), Doff(doff), Dlen(dlen),
135 short dlen, doff = strlen(
Path);
139 while((nP = nsObj.
Index(rc)) && rc == 0)
140 {
do {dlen = nP->
Plen - doff;
142 nFile++; nBytes += nP->
Stat.st_size; nP->
Path = 0;
143 pP->
Next = fP; pP = fP;
144 nnP = nP->
Next;
delete nP;
148 if (pLast) *pLast = pP;
166 char *cgibeg = strchr(
Path,
'?' );
167 if( cgibeg ) *cgibeg =
'\0';
169 if( cgibeg ) *cgibeg =
'?';
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