25#ifndef __XRD_CL_FILE_HH__
26#define __XRD_CL_FILE_HH__
66 File(
bool enablePlugIns =
true );
81 File(
const std::string &url,
bool enablePlugIns =
true );
121 const std::
string &url,
158 const std::
string &url,
316 std::vector<uint32_t> &cksums,
376 time_t timeout = 0 );
390 time_t timeout = 0 );
411 time_t timeout = 0 );
430 time_t timeout = 0 );
447 std::vector<uint32_t> &cksums,
466 std::vector<uint32_t> &cksums,
641 const struct iovec *
iov,
644 time_t timeout = 0 );
657 const struct iovec *
iov,
659 time_t timeout = 0 );
676 time_t timeout = 0 );
693 time_t timeout = 0 );
803 time_t timeout = 0 );
817 time_t timeout = 0 );
833 time_t timeout = 0 );
846 std::vector<
XAttr> &result,
847 time_t timeout = 0 );
863 time_t timeout = 0 );
877 time_t timeout = 0 );
891 time_t timeout = 0 );
903 time_t timeout = 0 );
934 bool SetProperty( const std::
string &name, const std::
string &value );
945 bool GetProperty( const std::
string &name, std::
string &value ) const;
949 template<
bool HasHndl>
952 template<
bool HasHndl>
955 template <
bool HasHndl>
964 void InitPlugin( const std::
string &url);
979 time_t timeout = 0 );
996 time_t timeout = 0 );
1010 const struct iovec *
iov,
1013 time_t timeout = 0 );
1019 bool pEnablePlugIns;
1024 std::unique_ptr<ExportedFileTemplate>
file;
1043 void Add(
const File &file, off_t dstOffs, off_t srcOffs, off_t srcLen)
1049 loc.
file = file.GetFileTemplate();
#define XRD_WARN_UNUSED_RESULT
Binary blob representation.
virtual ~ExportedFileTemplate()
An interface for file plug-ins.
bool IsSecure() const
Check if the file is using an encrypted connection.
XRootDStatus Open(const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus ReadV(uint64_t offset, struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
friend struct CloneLocations
bool IsOpen() const
Check if the file is open.
friend class ChkptWrtImpl
friend class CheckpointImpl
XRootDStatus Clone(const CloneLocations &locs, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus OpenUsingTemplate(const File &rfile, const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus TryOtherServer(time_t timeout=0)
friend class ChkptWrtVImpl
bool GetProperty(const std::string &name, std::string &value) const
XRootDStatus PreRead(const TractList &tracts, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
File(bool enablePlugIns=true)
virtual ~File()
Destructor.
bool SetProperty(const std::string &name, const std::string &value)
Handle an async response.
ReadImpl< false > Read(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, time_t timeout=0)
Factory for creating ReadImpl objects.
GetXAttrImpl< false > GetXAttr(Ctx< File > file, Arg< std::string > name)
VectorReadImpl< false > VectorRead(Ctx< File > file, Arg< ChunkList > chunks, Arg< void * > buffer, time_t timeout=0)
Factory for creating VectorReadImpl objects.
StatImpl< false > Stat(Ctx< File > file, Arg< bool > force, time_t timeout=0)
DelXAttrImpl< false > DelXAttr(Ctx< File > file, Arg< std::string > name)
WriteVImpl< false > WriteV(Ctx< File > file, Arg< uint64_t > offset, Arg< std::vector< iovec > > iov, time_t timeout=0)
Factory for creating WriteVImpl objects.
std::unique_ptr< ExportedFileTemplate > file
PgWriteImpl< false > PgWrite(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, Arg< std::vector< uint32_t > > cksums, time_t timeout=0)
Factory for creating PgReadImpl objects.
CloseImpl< false > Close(Ctx< File > file, time_t timeout=0)
Factory for creating CloseImpl objects.
SetXAttrImpl< false > SetXAttr(Ctx< File > file, Arg< std::string > name, Arg< std::string > value)
SyncImpl< false > Sync(Ctx< File > file, time_t timeout=0)
Factory for creating SyncImpl objects.
std::vector< TractInfo > TractList
List of Tracts.
PgReadImpl< false > PgRead(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< void * > buffer, time_t timeout=0)
Factory for creating PgReadImpl objects.
ListXAttrImpl< false > ListXAttr(Ctx< File > file)
std::tuple< std::string, std::string > xattr_t
Extended attribute key - value pair.
std::vector< ChunkInfo > ChunkList
List of chunks.
OpenImpl< false > Open(Ctx< File > file, Arg< std::string > url, Arg< OpenFlags::Flags > flags, Arg< Access::Mode > mode=Access::None, time_t timeout=0)
Factory for creating ReadImpl objects.
WriteImpl< false > Write(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< const void * > buffer, time_t timeout=0)
Factory for creating WriteImpl objects.
VectorWriteImpl< false > VectorWrite(Ctx< File > file, Arg< ChunkList > chunks, time_t timeout=0)
Factory for creating VectorWriteImpl objects.
TruncateImpl< false > Truncate(Ctx< File > file, Arg< uint64_t > size, time_t timeout)
none object for initializing empty Optional
void Add(const File &file, off_t dstOffs, off_t srcOffs, off_t srcLen)
std::vector< CloneLocation > locations
Open flags, may be or'd when appropriate.
Flags
Open flags, may be or'd when appropriate.
XRootD query request codes.
Extended attribute operation status.
Extended attributes with status.