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},
65 static int pTnum =
sizeof(pTab)/
sizeof(
struct proto);
82 while(i)
if (
Path[i-1] !=
'/' || (i > 1 &&
Path[i-2] !=
'/'))
break;
87 if (!strcmp(
Path,
"-"))
94 for (i = 0; i < pTnum; i++)
95 {
if (!strncmp(FSpec, pTab[i].pHdr, pTab[i].pHsz))
97 memcpy(
ProtName, pTab[i].pHdr, pTab[i].pHsz-3);
105 if (!strncmp(
Path,
"file://", 7))
106 {
char *pP =
Path + 7;
107 if (!strncmp(pP,
"localhost", 9)) memmove(
Path, pP + 9, strlen( pP + 9 ) + 1 );
108 else if (*pP ==
'/') memmove(
Path, pP, strlen( pP ) + 1 );
123 : Next(0),
Path(FSpec), Doff(doff), Dlen(dlen),
137 short dlen, doff = strlen(
Path);
141 while((nP = nsObj.
Index(rc)) && rc == 0)
142 {
do {dlen = nP->
Plen - doff;
144 nFile++; nBytes += nP->
Stat.st_size; nP->
Path = 0;
145 pP->
Next = fP; pP = fP;
146 nnP = nP->
Next;
delete nP;
150 if (pLast) *pLast = pP;
168 char *cgibeg = strchr(
Path,
'?' );
169 if( cgibeg ) *cgibeg =
'\0';
171 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