1 #ifndef __XRDPOSIXPREPIO_HH__
2 #define __XRDPOSIXPREPIO_HH__
48 {
return (Init() ? fileP->
Fcntl(opc, args, resp) : openRC);}
50 long long FSize() {
return (Init() ? fileP->
FSize() : openRC);}
53 {
return (Init() ? fileP->
Fstat(buf) : openRC);}
55 int Open() {Init();
return openRC;}
59 int Read (
char *Buffer,
long long Offset,
int Length)
60 {
return (Init() ? fileP->
Read(Buffer, Offset, Length) : openRC);}
63 {
if (Init(&iocb)) fileP->
Read(iocb, buff, offs, rlen);
64 else iocb.
Done(openRC);
68 {
return (Init() ? fileP->
ReadV(readV, n) : openRC);}
71 {
if (Init(&iocb)) fileP->
ReadV(iocb, readV, rnum);
72 else iocb.
Done(openRC);
75 int Sync() {
return (Init() ? fileP->
Sync() : openRC);}
78 {
if (Init(&iocb)) fileP->
Sync(iocb);
79 else iocb.
Done(openRC);
83 {
return (Init() ? fileP->
Trunc(Offset) : openRC);}
85 int Write(
char *Buffer,
long long Offset,
int Length)
86 {
return (Init() ? fileP->
Write(Buffer,Offset,Length) : openRC);}
89 {
if (Init(&iocb)) fileP->
Write(iocb, buff, offs, wlen);
90 else iocb.
Done(openRC);
95 : fileP(fP), openRC(0), iCalls(0),
96 clFlags(clflags), clMode(clmode) {}
virtual void Done(int result)=0
const char * Path() override
int Write(char *Buff, long long Offs, int Len) override
int Fcntl(XrdOucCacheOp::Code opc, const std::string &args, std::string &resp) override
long long FSize() override
int Read(char *Buff, long long Offs, int Len) override
int Fstat(struct stat &buf) override
int Trunc(long long Offset) override
int ReadV(const XrdOucIOVec *readV, int n) override
int ReadV(const XrdOucIOVec *readV, int n)
int Read(char *Buffer, long long Offset, int Length)
int Write(char *Buffer, long long Offset, int Length)
bool Detach(XrdOucCacheIOCD &cdP)
void Sync(XrdOucCacheIOCB &iocb)
int Fcntl(XrdOucCacheOp::Code opc, const std::string &args, std::string &resp)
void Write(XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen)
void Read(XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen)
int Trunc(long long Offset)
XrdPosixPrepIO(XrdPosixFile *fP, XrdCl::OpenFlags::Flags clflags, XrdCl::Access::Mode clmode)
virtual ~XrdPosixPrepIO()
void ReadV(XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int rnum)
int Fstat(struct stat &buf)
Flags
Open flags, may be or'd when appropriate.