Loading...
Searching...
No Matches
XrdClFileOperations.hh
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2011-2017 by European Organization for Nuclear Research (CERN)
// Author: Krzysztof Jamrog <krzysztof.piotr.jamrog@cern.ch>,
// Michal Simon <michal.simon@cern.ch>
//------------------------------------------------------------------------------
// This file is part of the XRootD software suite.
//
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//
// In applying this licence, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//------------------------------------------------------------------------------
#ifndef __XRD_CL_FILE_OPERATIONS_HH__
#define __XRD_CL_FILE_OPERATIONS_HH__
#include "XrdCl/XrdClFile.hh"
#include "XrdCl/XrdClOperations.hh"
#include "XrdCl/XrdClOperationHandlers.hh"
#include "XrdCl/XrdClCtx.hh"
namespace XrdCl
{
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<template<bool> class Derived, bool HasHndl, typename Response, typename ... Arguments>
class FileOperation: public ConcreteOperation<Derived, HasHndl, Response, Arguments...>
{
template<template<bool> class, bool, typename, typename ...> friend class FileOperation;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FileOperation( Ctx<File> f, Arguments... args): ConcreteOperation<Derived, false, Response, Arguments...>( std::move( args )... ), file( std::move( f ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<bool from>
FileOperation( FileOperation<Derived, from, Response, Arguments...> && op ) :
ConcreteOperation<Derived, HasHndl, Response, Arguments...>( std::move( op ) ), file( op.file )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual ~FileOperation()
{
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Ctx<File> file;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class OpenImpl: public FileOperation<OpenImpl, HasHndl, Resp<void>, Arg<std::string>,
Arg<OpenFlags::Flags>, Arg<Access::Mode>>
{
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct ExResp : public Resp<void>
{
//--------------------------------------------------------------------
//--------------------------------------------------------------------
ExResp( const Ctx<File> &file ): file( file )
{
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
inline ResponseHandler* Create( std::function<void( XRootDStatus&,
StatInfo& )> func )
{
return new ExOpenFuncWrapper( this->file, func );
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
using Resp<void>::Create;
//--------------------------------------------------------------------
//--------------------------------------------------------------------
Ctx<File> file;
};
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
OpenImpl( Ctx<File> f, Arg<std::string> url, Arg<OpenFlags::Flags> flags,
Arg<Access::Mode> mode = Access::None ) :
FileOperation<OpenImpl, HasHndl, Resp<void>, Arg<std::string>, Arg<OpenFlags::Flags>,
Arg<Access::Mode>>( std::move( f ), std::move( url ), std::move( flags ),
std::move( mode ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<bool from>
OpenImpl( OpenImpl<from> && open ) :
FileOperation<OpenImpl, HasHndl, Resp<void>, Arg<std::string>, Arg<OpenFlags::Flags>,
Arg<Access::Mode>>( std::move( open ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { UrlArg, FlagsArg, ModeArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<typename Hdlr>
OpenImpl<true> operator>>( Hdlr &&hdlr )
{
ExResp factory( *this->file );
return this->StreamImpl( factory.Create( hdlr ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Open";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
const std::string &url = std::get<UrlArg>( this->args );
OpenFlags::Flags flags = std::get<FlagsArg>( this->args );
Access::Mode mode = std::get<ModeArg>( this->args );
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Open( url, flags, mode, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline OpenImpl<false> Open( Ctx<File> file, Arg<std::string> url, Arg<OpenFlags::Flags> flags,
Arg<Access::Mode> mode = Access::None, uint16_t timeout = 0 )
{
return OpenImpl<false>( std::move( file ), std::move( url ), std::move( flags ),
std::move( mode ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class ReadImpl: public FileOperation<ReadImpl, HasHndl, Resp<ChunkInfo>,
Arg<uint64_t>, Arg<uint32_t>, Arg<void*>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<ReadImpl, HasHndl, Resp<ChunkInfo>, Arg<uint64_t>,
Arg<uint32_t>, Arg<void*>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { OffsetArg, SizeArg, BufferArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Read";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t offset = std::get<OffsetArg>( this->args ).Get();
uint32_t size = std::get<SizeArg>( this->args ).Get();
void *buffer = std::get<BufferArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Read( offset, size, buffer, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline ReadImpl<false> Read( Ctx<File> file, Arg<uint64_t> offset, Arg<uint32_t> size,
Arg<void*> buffer, uint16_t timeout = 0 )
{
return ReadImpl<false>( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class PgReadImpl: public FileOperation<PgReadImpl, HasHndl, Resp<PageInfo>,
Arg<uint64_t>, Arg<uint32_t>, Arg<void*>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<PgReadImpl, HasHndl, Resp<PageInfo>, Arg<uint64_t>,
Arg<uint32_t>, Arg<void*>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { OffsetArg, SizeArg, BufferArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "PgRead";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t offset = std::get<OffsetArg>( this->args ).Get();
uint32_t size = std::get<SizeArg>( this->args ).Get();
void *buffer = std::get<BufferArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->PgRead( offset, size, buffer, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline PgReadImpl<false> PgRead( Ctx<File> file, Arg<uint64_t> offset,
Arg<uint32_t> size, Arg<void*> buffer,
uint16_t timeout = 0 )
{
return PgReadImpl<false>( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename RSP> struct ReadTrait { };
template<> struct ReadTrait<ChunkInfo> { using RET = ReadImpl<false>; };
template<> struct ReadTrait<PageInfo> { using RET = PgReadImpl<false>; };
template<typename RSP> inline typename ReadTrait<RSP>::RET
RdWithRsp( Ctx<File> file, Arg<uint64_t> offset, Arg<uint32_t> size,
Arg<void*> buffer, uint16_t timeout = 0 );
template<> inline ReadImpl<false>
RdWithRsp<ChunkInfo>( Ctx<File> file, Arg<uint64_t> offset, Arg<uint32_t> size,
Arg<void*> buffer, uint16_t timeout )
{
return Read( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ), timeout );
}
template<> inline PgReadImpl<false>
RdWithRsp<PageInfo>( Ctx<File> file, Arg<uint64_t> offset, Arg<uint32_t> size,
Arg<void*> buffer, uint16_t timeout )
{
return PgRead( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ), timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class PgWriteImpl: public FileOperation<PgWriteImpl, HasHndl, Resp<void>,
Arg<uint64_t>, Arg<uint32_t>, Arg<void*>, Arg<std::vector<uint32_t>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<PgWriteImpl, HasHndl, Resp<void>, Arg<uint64_t>,
Arg<uint32_t>, Arg<void*>, Arg<std::vector<uint32_t>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { OffsetArg, SizeArg, BufferArg, CksumsArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "PgWrite";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t offset = std::get<OffsetArg>( this->args ).Get();
uint32_t size = std::get<SizeArg>( this->args ).Get();
void *buffer = std::get<BufferArg>( this->args ).Get();
std::vector<uint32_t> cksums = std::get<CksumsArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->PgWrite( offset, size, buffer, cksums, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline PgWriteImpl<false> PgWrite( Ctx<File> file, Arg<uint64_t> offset,
Arg<uint32_t> size, Arg<void*> buffer,
Arg<std::vector<uint32_t>> cksums,
uint16_t timeout = 0 )
{
return PgWriteImpl<false>( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ), std::move( cksums ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline PgWriteImpl<false> PgWrite( Ctx<File> file, Arg<uint64_t> offset,
Arg<uint32_t> size, Arg<void*> buffer,
uint16_t timeout = 0 )
{
std::vector<uint32_t> cksums;
return PgWriteImpl<false>( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ), std::move( cksums ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class CloseImpl: public FileOperation<CloseImpl, HasHndl, Resp<void>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<CloseImpl, HasHndl, Resp<void>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Close";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Close( handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline CloseImpl<false> Close( Ctx<File> file, uint16_t timeout = 0 )
{
return CloseImpl<false>( std::move( file ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class StatImpl: public FileOperation<StatImpl, HasHndl, Resp<StatInfo>, Arg<bool>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<StatImpl, HasHndl, Resp<StatInfo>, Arg<bool>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { ForceArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Stat";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
bool force = std::get<ForceArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Stat( force, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline StatImpl<false> Stat( Ctx<File> file, Arg<bool> force, uint16_t timeout = 0 )
{
return StatImpl<false>( std::move( file ), std::move( force ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class WriteImpl: public FileOperation<WriteImpl, HasHndl, Resp<void>, Arg<uint64_t>,
Arg<uint32_t>, Arg<const void*>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<WriteImpl, HasHndl, Resp<void>, Arg<uint64_t>, Arg<uint32_t>,
Arg<const void*>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { OffsetArg, SizeArg, BufferArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Write";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t offset = std::get<OffsetArg>( this->args ).Get();
uint32_t size = std::get<SizeArg>( this->args ).Get();
const void *buffer = std::get<BufferArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Write( offset, size, buffer, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline WriteImpl<false> Write( Ctx<File> file, Arg<uint64_t> offset, Arg<uint32_t> size,
Arg<const void*> buffer, uint16_t timeout = 0 )
{
return WriteImpl<false>( std::move( file ), std::move( offset ), std::move( size ),
std::move( buffer ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class SyncImpl: public FileOperation<SyncImpl, HasHndl, Resp<void>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<SyncImpl, HasHndl, Resp<void>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Sync";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Sync( handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline SyncImpl<false> Sync( Ctx<File> file, uint16_t timeout = 0 )
{
return SyncImpl<false>( std::move( file ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class TruncateImpl: public FileOperation<TruncateImpl, HasHndl, Resp<void>, Arg<uint64_t>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<TruncateImpl, HasHndl, Resp<void>, Arg<uint64_t>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { SizeArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Truncate";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t size = std::get<SizeArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Truncate( size, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline TruncateImpl<false> Truncate( Ctx<File> file, Arg<uint64_t> size, uint16_t timeout )
{
return TruncateImpl<false>( std::move( file ), std::move( size ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class VectorReadImpl: public FileOperation<VectorReadImpl, HasHndl,
Resp<VectorReadInfo>, Arg<ChunkList>, Arg<void*>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<VectorReadImpl, HasHndl, Resp<VectorReadInfo>, Arg<ChunkList>,
Arg<void*>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { ChunksArg, BufferArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "VectorRead";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
ChunkList &chunks = std::get<ChunksArg>( this->args ).Get();
void *buffer = std::get<BufferArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->VectorRead( chunks, buffer, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline VectorReadImpl<false> VectorRead( Ctx<File> file, Arg<ChunkList> chunks,
Arg<void*> buffer, uint16_t timeout = 0 )
{
return VectorReadImpl<false>( std::move( file ), std::move( chunks ), std::move( buffer ) ).Timeout( timeout );
}
inline VectorReadImpl<false> VectorRead( Ctx<File> file, Arg<ChunkList> chunks,
uint16_t timeout = 0 )
{
return VectorReadImpl<false>( std::move( file ), std::move( chunks ), nullptr ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class VectorWriteImpl: public FileOperation<VectorWriteImpl, HasHndl, Resp<void>,
Arg<ChunkList>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<VectorWriteImpl, HasHndl, Resp<void>, Arg<ChunkList>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { ChunksArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "VectorWrite";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
const ChunkList &chunks = std::get<ChunksArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->VectorWrite( chunks, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline VectorWriteImpl<false> VectorWrite( Ctx<File> file, Arg<ChunkList> chunks,
uint16_t timeout = 0 )
{
return VectorWriteImpl<false>( std::move( file ), std::move( chunks ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class WriteVImpl: public FileOperation<WriteVImpl, HasHndl, Resp<void>, Arg<uint64_t>,
Arg<std::vector<iovec>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<WriteVImpl, HasHndl, Resp<void>, Arg<uint64_t>,
Arg<std::vector<iovec>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { OffsetArg, IovArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "WriteV";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint64_t offset = std::get<OffsetArg>( this->args ).Get();
std::vector<iovec> &stdiov = std::get<IovArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
int iovcnt = stdiov.size();
iovec iov[iovcnt];
for( size_t i = 0; i < stdiov.size(); ++i )
{
iov[i].iov_base = stdiov[i].iov_base;
iov[i].iov_len = stdiov[i].iov_len;
}
return this->file->WriteV( offset, iov, iovcnt, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline WriteVImpl<false> WriteV( Ctx<File> file, Arg<uint64_t> offset,
Arg<std::vector<iovec>> iov, uint16_t timeout = 0 )
{
return WriteVImpl<false>( std::move( file ), std::move( offset ),
std::move( iov ) ).Timeout( timeout );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class FcntlImpl: public FileOperation<FcntlImpl, HasHndl, Resp<Buffer>, Arg<Buffer>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<FcntlImpl, HasHndl, Resp<Buffer>, Arg<Buffer>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { BufferArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Fcntl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
Buffer &arg = std::get<BufferArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Fcntl( arg, handler, timeout );
}
};
typedef FcntlImpl<false> Fcntl;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class VisaImpl: public FileOperation<VisaImpl, HasHndl, Resp<Buffer>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<VisaImpl, HasHndl, Resp<Buffer>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "Visa";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->Visa( handler, timeout );
}
};
typedef VisaImpl<false> Visa;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class SetXAttrImpl: public FileOperation<SetXAttrImpl, HasHndl, Resp<void>,
Arg<std::string>, Arg<std::string>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<SetXAttrImpl, HasHndl, Resp<void>,
Arg<std::string>, Arg<std::string>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { NameArg, ValueArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "SetXAttrImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::string &name = std::get<NameArg>( this->args ).Get();
std::string &value = std::get<ValueArg>( this->args ).Get();
// wrap the arguments with a vector
std::vector<xattr_t> attrs;
attrs.push_back( xattr_t( name, value ) );
// wrap the PipelineHandler so the response gets unpacked properly
UnpackXAttrStatus *h = new UnpackXAttrStatus( handler );
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
XRootDStatus st = this->file->SetXAttr( attrs, h, timeout );
if( !st.IsOK() ) delete h;
return st;
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline SetXAttrImpl<false> SetXAttr( Ctx<File> file, Arg<std::string> name, Arg<std::string> value )
{
return SetXAttrImpl<false>( std::move( file ), std::move( name ), std::move( value ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class SetXAttrBulkImpl: public FileOperation<SetXAttrBulkImpl, HasHndl,
Resp<std::vector<XAttrStatus>>, Arg<std::vector<xattr_t>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<SetXAttrBulkImpl, HasHndl, Resp<std::vector<XAttrStatus>>,
Arg<std::vector<xattr_t>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { AttrsArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "SetXAttrBulkImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::vector<xattr_t> &attrs = std::get<AttrsArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->SetXAttr( attrs, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline SetXAttrBulkImpl<false> SetXAttr( Ctx<File> file, Arg<std::vector<xattr_t>> attrs )
{
return SetXAttrBulkImpl<false>( std::move( file ), std::move( attrs ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class GetXAttrImpl: public FileOperation<GetXAttrImpl, HasHndl, Resp<std::string>,
Arg<std::string>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<GetXAttrImpl, HasHndl, Resp<std::string>,
Arg<std::string>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { NameArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "GetXAttrImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::string &name = std::get<NameArg>( this->args ).Get();
// wrap the argument with a vector
std::vector<std::string> attrs;
attrs.push_back( name );
// wrap the PipelineHandler so the response gets unpacked properly
UnpackXAttr *h = new UnpackXAttr( handler );
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
XRootDStatus st = this->file->GetXAttr( attrs, h, timeout );
if( !st.IsOK() ) delete h;
return st;
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline GetXAttrImpl<false> GetXAttr( Ctx<File> file, Arg<std::string> name )
{
return GetXAttrImpl<false>( std::move( file ), std::move( name ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class GetXAttrBulkImpl: public FileOperation<GetXAttrBulkImpl, HasHndl, Resp<std::vector<XAttr>>,
Arg<std::vector<std::string>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<GetXAttrBulkImpl, HasHndl, Resp<std::vector<XAttr>>,
Arg<std::vector<std::string>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { NamesArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "GetXAttrBulkImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::vector<std::string> &attrs = std::get<NamesArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->GetXAttr( attrs, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline GetXAttrBulkImpl<false> GetXAttr( Ctx<File> file, Arg<std::vector<std::string>> attrs )
{
return GetXAttrBulkImpl<false>( std::move( file ), std::move( attrs ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class DelXAttrImpl: public FileOperation<DelXAttrImpl, HasHndl, Resp<void>,
Arg<std::string>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<DelXAttrImpl, HasHndl, Resp<void>, Arg<std::string>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { NameArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "DelXAttrImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::string &name = std::get<NameArg>( this->args ).Get();
// wrap the argument with a vector
std::vector<std::string> attrs;
attrs.push_back( name );
// wrap the PipelineHandler so the response gets unpacked properly
UnpackXAttrStatus *h = new UnpackXAttrStatus( handler );
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
XRootDStatus st = this->file->DelXAttr( attrs, h, timeout );
if( !st.IsOK() ) delete h;
return st;
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline DelXAttrImpl<false> DelXAttr( Ctx<File> file, Arg<std::string> name )
{
return DelXAttrImpl<false>( std::move( file ), std::move( name ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class DelXAttrBulkImpl: public FileOperation<DelXAttrBulkImpl, HasHndl,
Resp<std::vector<XAttrStatus>>, Arg<std::vector<std::string>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<DelXAttrBulkImpl, HasHndl, Resp<std::vector<XAttrStatus>>,
Arg<std::vector<std::string>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
enum { NamesArg };
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "DelXAttrBulkImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
std::vector<std::string> &attrs = std::get<NamesArg>( this->args ).Get();
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->DelXAttr( attrs, handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline DelXAttrBulkImpl<false> DelXAttr( Ctx<File> file, Arg<std::vector<std::string>> attrs )
{
return DelXAttrBulkImpl<false>( std::move( file ), std::move( attrs ) );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<bool HasHndl>
class ListXAttrImpl: public FileOperation<ListXAttrImpl, HasHndl,
Resp<std::vector<XAttr>>>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using FileOperation<ListXAttrImpl, HasHndl, Resp<std::vector<XAttr>>>::FileOperation;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::string ToString()
{
return "ListXAttrImpl";
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus RunImpl( PipelineHandler *handler, uint16_t pipelineTimeout )
{
uint16_t timeout = pipelineTimeout < this->timeout ?
pipelineTimeout : this->timeout;
return this->file->ListXAttr( handler, timeout );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
inline ListXAttrImpl<false> ListXAttr( Ctx<File> file )
{
return ListXAttrImpl<false>( std::move( file ) );
}
}
#endif // __XRD_CL_FILE_OPERATIONS_HH__
Stat
struct stat Stat
Definition XrdCks.cc:49
XrdClCtx.hh
XrdClFile.hh
XrdClOperationHandlers.hh
XrdClOperations.hh
open
#define open
Definition XrdPosix.hh:76
Mode
int Mode
Definition XrdSecgsiProxy.cc:94
Create
bool Create
Definition XrdSecpwdSrvAdmin.cc:176
XrdCl::Arg
Definition XrdClArg.hh:234
XrdCl::Buffer
Binary blob representation.
Definition XrdClBuffer.hh:34
XrdCl::CloseImpl
Close operation (.
Definition XrdClFileOperations.hh:446
XrdCl::CloseImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:471
XrdCl::CloseImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:457
XrdCl::ConcreteOperation< Derived, HasHndl, Response, Arguments... >::args
std::tuple< Args... > args
Definition XrdClOperations.hh:737
XrdCl::ConcreteOperation< OpenImpl, HasHndl, Resp< void >, Arguments... >::StreamImpl
OpenImpl< true > StreamImpl(ResponseHandler *handler)
Definition XrdClOperations.hh:675
XrdCl::ConcreteOperation::Timeout
Derived< HasHndl > Timeout(uint16_t timeout)
Set operation timeout.
Definition XrdClOperations.hh:647
XrdCl::ConcreteOperation< OpenImpl, HasHndl, Resp< void >, Arguments... >::timeout
uint16_t timeout
Definition XrdClOperations.hh:742
XrdCl::ConcreteOperation< Derived, HasHndl, Response, Arguments... >::ConcreteOperation
friend class ConcreteOperation
Definition XrdClOperations.hh:520
XrdCl::DelXAttrBulkImpl
DelXAttr bulk operation (.
Definition XrdClFileOperations.hh:1267
XrdCl::DelXAttrBulkImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1299
XrdCl::DelXAttrBulkImpl::NamesArg
@ NamesArg
Definition XrdClFileOperations.hh:1279
XrdCl::DelXAttrBulkImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1284
XrdCl::DelXAttrImpl
DelXAttr operation (.
Definition XrdClFileOperations.hh:1206
XrdCl::DelXAttrImpl::NameArg
@ NameArg
Definition XrdClFileOperations.hh:1217
XrdCl::DelXAttrImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1236
XrdCl::DelXAttrImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1222
XrdCl::ExOpenFuncWrapper
Lambda wrapper.
Definition XrdClOperationHandlers.hh:344
XrdCl::FcntlImpl
Fcntl operation (.
Definition XrdClFileOperations.hh:884
XrdCl::FcntlImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:900
XrdCl::FcntlImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:914
XrdCl::FcntlImpl< false >::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:895
XrdCl::FileOperation::FileOperation
FileOperation(Ctx< File > f, Arguments... args)
Definition XrdClFileOperations.hh:57
XrdCl::FileOperation::~FileOperation
virtual ~FileOperation()
Destructor.
Definition XrdClFileOperations.hh:78
XrdCl::FileOperation::FileOperation
FileOperation(FileOperation< Derived, from, Response, Arguments... > &&op)
Definition XrdClFileOperations.hh:69
XrdCl::FileOperation::FileOperation
friend class FileOperation
Definition XrdClFileOperations.hh:48
XrdCl::FileOperation::file
Ctx< File > file
The file object itself.
Definition XrdClFileOperations.hh:88
XrdCl::GetXAttrBulkImpl
GetXAttr bulk operation (.
Definition XrdClFileOperations.hh:1150
XrdCl::GetXAttrBulkImpl::NamesArg
@ NamesArg
Definition XrdClFileOperations.hh:1162
XrdCl::GetXAttrBulkImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1167
XrdCl::GetXAttrBulkImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1182
XrdCl::GetXAttrImpl
GetXAttr operation (.
Definition XrdClFileOperations.hh:1088
XrdCl::GetXAttrImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1105
XrdCl::GetXAttrImpl::NameArg
@ NameArg
Definition XrdClFileOperations.hh:1100
XrdCl::GetXAttrImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1119
XrdCl::ListXAttrImpl
ListXAttr bulk operation (.
Definition XrdClFileOperations.hh:1323
XrdCl::ListXAttrImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1349
XrdCl::ListXAttrImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1334
XrdCl::OpenImpl
Open operation (.
Definition XrdClFileOperations.hh:97
XrdCl::OpenImpl::FlagsArg
@ FlagsArg
Definition XrdClFileOperations.hh:170
XrdCl::OpenImpl::ModeArg
@ ModeArg
Definition XrdClFileOperations.hh:170
XrdCl::OpenImpl::UrlArg
@ UrlArg
Definition XrdClFileOperations.hh:170
XrdCl::OpenImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:201
XrdCl::OpenImpl::OpenImpl
OpenImpl(OpenImpl< from > &&open)
Definition XrdClFileOperations.hh:160
XrdCl::OpenImpl::operator>>
OpenImpl< true > operator>>(Hdlr &&hdlr)
Definition XrdClFileOperations.hh:179
XrdCl::OpenImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:188
XrdCl::OpenImpl::OpenImpl
OpenImpl(Ctx< File > f, Arg< std::string > url, Arg< OpenFlags::Flags > flags, Arg< Access::Mode > mode=Access::None)
Constructor (.
Definition XrdClFileOperations.hh:144
XrdCl::Operation::handler
std::unique_ptr< PipelineHandler > handler
Operation handler.
Definition XrdClOperations.hh:150
XrdCl::PgReadImpl
PgRead operation (.
Definition XrdClFileOperations.hh:286
XrdCl::PgReadImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:303
XrdCl::PgReadImpl< false >::SizeArg
@ SizeArg
Definition XrdClFileOperations.hh:298
XrdCl::PgReadImpl< false >::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:298
XrdCl::PgReadImpl< false >::OffsetArg
@ OffsetArg
Definition XrdClFileOperations.hh:298
XrdCl::PgReadImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:317
XrdCl::PgWriteImpl
PgWrite operation (.
Definition XrdClFileOperations.hh:374
XrdCl::PgWriteImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:391
XrdCl::PgWriteImpl::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:386
XrdCl::PgWriteImpl::SizeArg
@ SizeArg
Definition XrdClFileOperations.hh:386
XrdCl::PgWriteImpl::CksumsArg
@ CksumsArg
Definition XrdClFileOperations.hh:386
XrdCl::PgWriteImpl::OffsetArg
@ OffsetArg
Definition XrdClFileOperations.hh:386
XrdCl::PgWriteImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:405
XrdCl::PipelineHandler
Definition XrdClOperations.hh:168
XrdCl::ReadImpl
Read operation (.
Definition XrdClFileOperations.hh:228
XrdCl::ReadImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:259
XrdCl::ReadImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:245
XrdCl::ReadImpl< false >::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:240
XrdCl::ReadImpl< false >::OffsetArg
@ OffsetArg
Definition XrdClFileOperations.hh:240
XrdCl::ReadImpl< false >::SizeArg
@ SizeArg
Definition XrdClFileOperations.hh:240
XrdCl::ResponseHandler
Handle an async response.
Definition XrdClXRootDResponses.hh:1127
XrdCl::SetXAttrBulkImpl
SetXAttr bulk operation (.
Definition XrdClFileOperations.hh:1032
XrdCl::SetXAttrBulkImpl::AttrsArg
@ AttrsArg
Definition XrdClFileOperations.hh:1044
XrdCl::SetXAttrBulkImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:1049
XrdCl::SetXAttrBulkImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1064
XrdCl::SetXAttrImpl
SetXAttr operation (.
Definition XrdClFileOperations.hh:969
XrdCl::SetXAttrImpl::ValueArg
@ ValueArg
Definition XrdClFileOperations.hh:981
XrdCl::SetXAttrImpl::NameArg
@ NameArg
Definition XrdClFileOperations.hh:981
XrdCl::SetXAttrImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:1000
XrdCl::SetXAttrImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:986
XrdCl::StatImpl
Stat operation (.
Definition XrdClFileOperations.hh:492
XrdCl::StatImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:508
XrdCl::StatImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:522
XrdCl::StatImpl::ForceArg
@ ForceArg
Definition XrdClFileOperations.hh:503
XrdCl::StatInfo
Object stat info.
Definition XrdClXRootDResponses.hh:401
XrdCl::SyncImpl
Sync operation (.
Definition XrdClFileOperations.hh:603
XrdCl::SyncImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:628
XrdCl::SyncImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:614
XrdCl::TruncateImpl
Truncate operation (.
Definition XrdClFileOperations.hh:649
XrdCl::TruncateImpl::SizeArg
@ SizeArg
Definition XrdClFileOperations.hh:660
XrdCl::TruncateImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:665
XrdCl::TruncateImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:679
XrdCl::UnpackXAttrStatus
Helper class for unpacking single XAttrStatus from bulk response.
Definition XrdClOperationHandlers.hh:42
XrdCl::UnpackXAttr
Helper class for unpacking single XAttr from bulk response.
Definition XrdClOperationHandlers.hh:79
XrdCl::VectorReadImpl
VectorRead operation (.
Definition XrdClFileOperations.hh:703
XrdCl::VectorReadImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:720
XrdCl::VectorReadImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:734
XrdCl::VectorReadImpl::ChunksArg
@ ChunksArg
Definition XrdClFileOperations.hh:715
XrdCl::VectorReadImpl::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:715
XrdCl::VectorWriteImpl
VectorWrite operation (.
Definition XrdClFileOperations.hh:765
XrdCl::VectorWriteImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:781
XrdCl::VectorWriteImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:795
XrdCl::VectorWriteImpl::ChunksArg
@ ChunksArg
Definition XrdClFileOperations.hh:776
XrdCl::VisaImpl
Visa operation (.
Definition XrdClFileOperations.hh:929
XrdCl::VisaImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:954
XrdCl::VisaImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:940
XrdCl::WriteImpl
Write operation (.
Definition XrdClFileOperations.hh:546
XrdCl::WriteImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:563
XrdCl::WriteImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:577
XrdCl::WriteImpl::SizeArg
@ SizeArg
Definition XrdClFileOperations.hh:558
XrdCl::WriteImpl::OffsetArg
@ OffsetArg
Definition XrdClFileOperations.hh:558
XrdCl::WriteImpl::BufferArg
@ BufferArg
Definition XrdClFileOperations.hh:558
XrdCl::WriteVImpl
WriteV operation (.
Definition XrdClFileOperations.hh:819
XrdCl::WriteVImpl::OffsetArg
@ OffsetArg
Definition XrdClFileOperations.hh:831
XrdCl::WriteVImpl::IovArg
@ IovArg
Definition XrdClFileOperations.hh:831
XrdCl::WriteVImpl::ToString
std::string ToString()
Definition XrdClFileOperations.hh:836
XrdCl::WriteVImpl::RunImpl
XRootDStatus RunImpl(PipelineHandler *handler, uint16_t pipelineTimeout)
Definition XrdClFileOperations.hh:850
XrdCl::XRootDStatus
Request status.
Definition XrdClXRootDResponses.hh:219
XrdCl
Definition XrdClAction.hh:34
XrdCl::VectorWrite
VectorWriteImpl< false > VectorWrite(Ctx< File > file, Arg< ChunkList > chunks, uint16_t timeout=0)
Factory for creating VectorWriteImpl objects.
Definition XrdClFileOperations.hh:807
XrdCl::GetXAttr
GetXAttrImpl< false > GetXAttr(Ctx< File > file, Arg< std::string > name)
Definition XrdClFileOperations.hh:1139
XrdCl::Read
ReadImpl< false > Read(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, uint16_t timeout=0)
Factory for creating ReadImpl objects.
Definition XrdClFileOperations.hh:273
XrdCl::RdWithRsp< ChunkInfo >
ReadImpl< false > RdWithRsp< ChunkInfo >(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, uint16_t timeout)
Definition XrdClFileOperations.hh:353
XrdCl::Sync
SyncImpl< false > Sync(Ctx< File > file, uint16_t timeout=0)
Factory for creating SyncImpl objects.
Definition XrdClFileOperations.hh:639
XrdCl::ReadTrait< PageInfo >::RET
PgReadImpl< false > RET
Definition XrdClFileOperations.hh:346
XrdCl::Close
CloseImpl< false > Close(Ctx< File > file, uint16_t timeout=0)
Factory for creating CloseImpl objects.
Definition XrdClFileOperations.hh:482
XrdCl::DelXAttr
DelXAttrImpl< false > DelXAttr(Ctx< File > file, Arg< std::string > name)
Definition XrdClFileOperations.hh:1256
XrdCl::Truncate
TruncateImpl< false > Truncate(Ctx< File > file, Arg< uint64_t > size, uint16_t timeout)
Definition XrdClFileOperations.hh:692
XrdCl::Fcntl
FcntlImpl< false > Fcntl
Definition XrdClFileOperations.hh:922
XrdCl::PgRead
PgReadImpl< false > PgRead(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, uint16_t timeout=0)
Factory for creating PgReadImpl objects.
Definition XrdClFileOperations.hh:331
XrdCl::WriteV
WriteVImpl< false > WriteV(Ctx< File > file, Arg< uint64_t > offset, Arg< std::vector< iovec > > iov, uint16_t timeout=0)
Factory for creating WriteVImpl objects.
Definition XrdClFileOperations.hh:872
XrdCl::Visa
VisaImpl< false > Visa
Definition XrdClFileOperations.hh:961
XrdCl::SetXAttr
SetXAttrImpl< false > SetXAttr(Ctx< File > file, Arg< std::string > name, Arg< std::string > value)
Definition XrdClFileOperations.hh:1021
XrdCl::ListXAttr
ListXAttrImpl< false > ListXAttr(Ctx< File > file)
Definition XrdClFileOperations.hh:1361
XrdCl::Write
WriteImpl< false > Write(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< const void * > buffer, uint16_t timeout=0)
Factory for creating WriteImpl objects.
Definition XrdClFileOperations.hh:591
XrdCl::RdWithRsp< PageInfo >
PgReadImpl< false > RdWithRsp< PageInfo >(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, uint16_t timeout)
Definition XrdClFileOperations.hh:361
XrdCl::xattr_t
std::tuple< std::string, std::string > xattr_t
Extended attribute key - value pair.
Definition XrdClXRootDResponses.hh:289
XrdCl::RdWithRsp
ReadTrait< RSP >::RET RdWithRsp(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, uint16_t timeout=0)
XrdCl::PgWrite
PgWriteImpl< false > PgWrite(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, Arg< std::vector< uint32_t > > cksums, uint16_t timeout=0)
Factory for creating PgReadImpl objects.
Definition XrdClFileOperations.hh:420
XrdCl::ReadTrait< ChunkInfo >::RET
ReadImpl< false > RET
Definition XrdClFileOperations.hh:344
XrdCl::ChunkList
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition XrdClXRootDResponses.hh:1056
XrdCl::VectorRead
VectorReadImpl< false > VectorRead(Ctx< File > file, Arg< ChunkList > chunks, Arg< void * > buffer, uint16_t timeout=0)
Factory for creating VectorReadImpl objects.
Definition XrdClFileOperations.hh:747
XrdCl::Open
OpenImpl< false > Open(Ctx< File > file, Arg< std::string > url, Arg< OpenFlags::Flags > flags, Arg< Access::Mode > mode=Access::None, uint16_t timeout=0)
Factory for creating ReadImpl objects.
Definition XrdClFileOperations.hh:215
XrdCl::value
Response NullRef< Response >::value
Definition XrdClOperationHandlers.hh:128
XrdCl::ReadTrait
RdWithRsp: factory for creating ReadImpl/PgReadImpl objects.
Definition XrdClFileOperations.hh:342
XrdCl::Access
Access mode.
Definition XrdClFileSystem.hh:117
XrdCl::Access::Mode
Mode
Access mode.
Definition XrdClFileSystem.hh:122
XrdCl::Access::None
@ None
Definition XrdClFileSystem.hh:123
XrdCl::ChunkInfo
Describe a data chunk for vector read.
Definition XrdClXRootDResponses.hh:918
XrdCl::Ctx
Utility class for storing a pointer to operation context.
Definition XrdClCtx.hh:39
XrdCl::OpenFlags
Open flags, may be or'd when appropriate.
Definition XrdClFileSystem.hh:71
XrdCl::OpenFlags::Flags
Flags
Open flags, may be or'd when appropriate.
Definition XrdClFileSystem.hh:76
XrdCl::PageInfo
Definition XrdClXRootDResponses.hh:957
XrdCl::Resp
Definition XrdClOperationHandlers.hh:670
XrdCl::Status::IsOK
bool IsOK() const
We're fine.
Definition XrdClStatus.hh:124
iov
Definition XrdOucIOVec.hh:65