1 #ifndef __XRDPOSIXPREPIO_HH__
2 #define __XRDPOSIXPREPIO_HH__
46 long long FSize() {
return (Init() ? fileP->
FSize() : openRC);}
49 {
return (Init() ? fileP->
Fstat(buf) : openRC);}
51 int Open() {Init();
return openRC;}
55 int Read (
char *Buffer,
long long Offset,
int Length)
56 {
return (Init() ? fileP->
Read(Buffer, Offset, Length) : openRC);}
59 {
if (Init(&iocb)) fileP->
Read(iocb, buff, offs, rlen);
60 else iocb.
Done(openRC);
64 {
return (Init() ? fileP->
ReadV(readV, n) : openRC);}
67 {
if (Init(&iocb)) fileP->
ReadV(iocb, readV, rnum);
68 else iocb.
Done(openRC);
71 int Sync() {
return (Init() ? fileP->
Sync() : openRC);}
74 {
if (Init(&iocb)) fileP->
Sync(iocb);
75 else iocb.
Done(openRC);
79 {
return (Init() ? fileP->
Trunc(Offset) : openRC);}
81 int Write(
char *Buffer,
long long Offset,
int Length)
82 {
return (Init() ? fileP->
Write(Buffer,Offset,Length) : openRC);}
85 {
if (Init(&iocb)) fileP->
Write(iocb, buff, offs, wlen);
86 else iocb.
Done(openRC);
91 : fileP(fP), openRC(0), iCalls(0),
92 clFlags(clflags), clMode(clmode) {}
int stat(const char *path, struct stat *buf)
virtual void Done(int result)=0
const char * Path() override
int Write(char *Buff, long long Offs, int Len) 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)
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.