25 #ifndef __XRD_CL_FILE_HH__
26 #define __XRD_CL_FILE_HH__
41 struct CloneLocations;
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();
1050 locations.emplace_back(std::move(loc));
#define XRD_WARN_UNUSED_RESULT
Binary blob representation.
Checkpointed write operation (.
Checkpointed WriteV operation (.
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)
XRootDStatus VectorRead(const ChunkList &chunks, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus PgRead(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Sync(ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus WriteV(uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
bool IsOpen() const
Check if the file is open.
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)
XRootDStatus Truncate(uint64_t size, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus SetXAttr(const std::vector< xattr_t > &attrs, ResponseHandler *handler, time_t timeout=0)
bool GetProperty(const std::string &name, std::string &value) const
XRootDStatus ListXAttr(ResponseHandler *handler, time_t timeout=0)
XRootDStatus PreRead(const TractList &tracts, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
File(bool enablePlugIns=true)
XRootDStatus Read(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus GetXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
virtual ~File()
Destructor.
XRootDStatus Close(ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
bool SetProperty(const std::string &name, const std::string &value)
XRootDStatus Stat(bool force, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus PgWrite(uint64_t offset, uint32_t size, const void *buffer, std::vector< uint32_t > &cksums, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus VectorWrite(const ChunkList &chunks, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus DelXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
XRootDStatus Write(uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Handle an async response.
ChkptWrtImpl< false > ChkptWrt(Ctx< File > file, Arg< uint64_t > offset, Arg< uint32_t > size, Arg< const void * > buffer, time_t timeout=0)
Factory for creating ReadImpl objects.
std::unique_ptr< ExportedFileTemplate > file
ChkptWrtVImpl< false > ChkptWrtV(Ctx< File > file, Arg< uint64_t > offset, Arg< std::vector< iovec >> iov, time_t timeout=0)
Factory for creating ChkptWrtVImpl objects.
std::vector< TractInfo > TractList
List of Tracts.
std::tuple< std::string, std::string > xattr_t
Extended attribute key - value pair.
std::vector< ChunkInfo > ChunkList
List of chunks.
CheckpointImpl< false > Checkpoint(Ctx< File > file, Arg< ChkPtCode > code, time_t timeout=0)
Factory for creating ReadImpl objects.
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.