XRootD
XrdCl::File Class Reference

A file. More...

#include <XrdClFile.hh>

+ Collaboration diagram for XrdCl::File:

Public Types

enum  VirtRedirect {
  EnableVirtRedirect ,
  DisableVirtRedirect
}
 

Public Member Functions

 File (bool enablePlugIns=true)
 
 File (const std::string &url, bool enablePlugIns=true)
 
 File (VirtRedirect virtRedirect, bool enablePlugIns=true)
 
virtual ~File ()
 Destructor. More...
 
XRootDStatus Clone (const CloneLocations &locs, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Clone (const CloneLocations &locs, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Close (ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Close (time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus DelXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus DelXAttr (const std::vector< std::string > &attrs, std::vector< XAttrStatus > &result, time_t timeout=0)
 
XRootDStatus Fcntl (const Buffer &arg, Buffer *&response, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Fcntl (const Buffer &arg, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Fcntl (QueryCode::Code queryCode, const Buffer &arg, Buffer *&response, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Fcntl (QueryCode::Code queryCode, const Buffer &arg, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
bool GetProperty (const std::string &name, std::string &value) const
 
XRootDStatus GetXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus GetXAttr (const std::vector< std::string > &attrs, std::vector< XAttr > &result, time_t timeout=0)
 
bool IsOpen () const
 Check if the file is open. More...
 
bool IsSecure () const
 Check if the file is using an encrypted connection. More...
 
XRootDStatus ListXAttr (ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus ListXAttr (std::vector< XAttr > &result, time_t timeout=0)
 
XRootDStatus Open (const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Open (const std::string &url, OpenFlags::Flags flags, Access::Mode mode=Access::None, 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 OpenUsingTemplate (const File &rfile, const std::string &url, OpenFlags::Flags flags, Access::Mode mode=Access::None, 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 PgRead (uint64_t offset, uint32_t size, void *buffer, std::vector< uint32_t > &cksums, uint32_t &bytesRead, 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 PgWrite (uint64_t offset, uint32_t size, const void *buffer, std::vector< uint32_t > &cksums, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus PreRead (const TractList &tracts, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus PreRead (const TractList &tracts, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Read (uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Read (uint64_t offset, uint32_t size, void *buffer, uint32_t &bytesRead, 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 ReadV (uint64_t offset, struct iovec *iov, int iovcnt, uint32_t &bytesRead, time_t timeout=0)
 
bool SetProperty (const std::string &name, const std::string &value)
 
XRootDStatus SetXAttr (const std::vector< xattr_t > &attrs, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus SetXAttr (const std::vector< xattr_t > &attrs, std::vector< XAttrStatus > &result, time_t timeout=0)
 
XRootDStatus Stat (bool force, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Stat (bool force, StatInfo *&response, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Sync (ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Sync (time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Truncate (uint64_t size, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Truncate (uint64_t size, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus TryOtherServer (time_t timeout=0)
 
XRootDStatus VectorRead (const ChunkList &chunks, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus VectorRead (const ChunkList &chunks, void *buffer, VectorReadInfo *&vReadInfo, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus VectorWrite (const ChunkList &chunks, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus VectorWrite (const ChunkList &chunks, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Visa (Buffer *&visa, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Visa (ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 Get access token to a file - async. More...
 
XRootDStatus Write (uint64_t offset, Buffer &&buffer, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus Write (uint64_t offset, Buffer &&buffer, 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
 
XRootDStatus Write (uint64_t offset, uint32_t size, const void *buffer, time_t timeout=0) XRD_WARN_UNUSED_RESULT
 
XRootDStatus Write (uint64_t offset, uint32_t size, Optional< uint64_t > fdoff, int fd, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus Write (uint64_t offset, uint32_t size, Optional< uint64_t > fdoff, int fd, time_t timeout=0)
 
XRootDStatus WriteV (uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
 
XRootDStatus WriteV (uint64_t offset, const struct iovec *iov, int iovcnt, time_t timeout=0)
 

Friends

template<bool HasHndl>
class CheckpointImpl
 
template<bool HasHndl>
class ChkptWrtImpl
 
template<bool HasHndl>
class ChkptWrtVImpl
 
struct CloneLocations
 

Detailed Description

A file.

Definition at line 51 of file XrdClFile.hh.

Member Enumeration Documentation

◆ VirtRedirect

Enumerator
EnableVirtRedirect 
DisableVirtRedirect 

Definition at line 56 of file XrdClFile.hh.

57  {
60  };
@ EnableVirtRedirect
Definition: XrdClFile.hh:58
@ DisableVirtRedirect
Definition: XrdClFile.hh:59

Constructor & Destructor Documentation

◆ File() [1/3]

XrdCl::File::File ( bool  enablePlugIns = true)

Constructor

Parameters
enablePlugInsenable the plug-in mechanism for the object

Definition at line 59 of file XrdClFile.cc.

59  :
60  pPlugIn(0),
61  pEnablePlugIns( enablePlugIns )
62  {
63  pImpl = new FileImpl( pPlugIn );
64  }

◆ File() [2/3]

XrdCl::File::File ( VirtRedirect  virtRedirect,
bool  enablePlugIns = true 
)

Constructor

Parameters
virtRedirect
enablePlugIns

Definition at line 69 of file XrdClFile.cc.

69  :
70  pPlugIn(0),
71  pEnablePlugIns( enablePlugIns )
72  {
73  pImpl = new FileImpl( virtRedirect == EnableVirtRedirect, pPlugIn );
74  }

References EnableVirtRedirect.

◆ File() [3/3]

XrdCl::File::File ( const std::string &  url,
bool  enablePlugIns = true 
)

Constructor

Parameters
urlURL for the file to initialise the plugin for
enablePlugInsenable the plug-in mechanism for the object

Definition at line 79 of file XrdClFile.cc.

79  : pPlugIn(0), pEnablePlugIns(enablePlugIns)
80  {
81  InitPlugin(url);
82  pImpl = new FileImpl(pPlugIn);
83  }

◆ ~File()

XrdCl::File::~File ( )
virtual

Destructor.

Definition at line 88 of file XrdClFile.cc.

89  {
90  //--------------------------------------------------------------------------
91  // This, in principle, should never ever happen. Except for the case
92  // when we're interfaced with ROOT that may call this desctructor from
93  // its garbage collector, from its __cxa_finalize, ie. after the XrdCl lib
94  // has been finalized by the linker. So, if we don't have the log object
95  // at this point we just give up the hope.
96  // Also, make sure the PostMaster threads are running - if not the Close
97  // will hang forever (this could happen when Python interpreter exits).
98  //--------------------------------------------------------------------------
99  if ( DefaultEnv::GetLog() && DefaultEnv::GetPostMaster()->IsRunning() && IsOpen() )
100  XRootDStatus status = Close( nullptr, 0 );
101  delete pImpl;
102  delete pPlugIn;
103  }
static Log * GetLog()
Get default log.
static PostMaster * GetPostMaster()
Get default post master.
bool IsOpen() const
Check if the file is open.
Definition: XrdClFile.cc:962
XRootDStatus Close(ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:210

References Close(), XrdCl::DefaultEnv::GetLog(), XrdCl::DefaultEnv::GetPostMaster(), and IsOpen().

+ Here is the call graph for this function:

Member Function Documentation

◆ Clone() [1/2]

XRootDStatus XrdCl::File::Clone ( const CloneLocations locs,
ResponseHandler handler,
time_t  timeout = 0 
)

Clone files and ranges specified into the current file - async

Parameters
locsfiles, source ranges and dest offsets to be cloned
handlerhandler to be notified about the status of the operation
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 1016 of file XrdClFile.cc.

1017  {
1018  if( pPlugIn )
1019  return pPlugIn->Clone( locs, handler, timeout );
1020 
1021  return pImpl->pStateHandler->Clone( pImpl->pStateHandler, locs, handler, timeout );
1022  }
virtual XRootDStatus Clone(const CloneLocations &locs, ResponseHandler *handler, time_t timeout)
std::shared_ptr< FileStateHandler > pStateHandler
Definition: XrdClFile.cc:53

References XrdCl::FilePlugIn::Clone(), and XrdCl::FileImpl::pStateHandler.

Referenced by Clone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Clone() [2/2]

XRootDStatus XrdCl::File::Clone ( const CloneLocations locs,
time_t  timeout = 0 
)

Clone files and ranges specified into the current file - sync

Parameters
locsfiles, source ranges and dest offsets to be cloned
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 1027 of file XrdClFile.cc.

1028  {
1029  SyncResponseHandler handler;
1030  XRootDStatus st = Clone( locs, &handler, timeout );
1031  if( !st.IsOK() )
1032  return st;
1033 
1034  return MessageUtils::WaitForStatus( &handler );
1035  }
XRootDStatus Clone(const CloneLocations &locs, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:1016
static XRootDStatus WaitForStatus(SyncResponseHandler *handler)
Wait and return the status of the query.

References Clone(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ Close() [1/2]

XRootDStatus XrdCl::File::Close ( ResponseHandler handler,
time_t  timeout = 0 
)

Close the file - async

Parameters
handlerhandler to be notified about the status of the operation
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 210 of file XrdClFile.cc.

212  {
213  if( pPlugIn )
214  return pPlugIn->Close( handler, timeout );
215 
216  return FileStateHandler::Close( pImpl->pStateHandler, handler, timeout );
217  }
virtual XRootDStatus Close(ResponseHandler *handler, time_t timeout)
static XRootDStatus Close(std::shared_ptr< FileStateHandler > &self, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FilePlugIn::Close(), XrdCl::FileStateHandler::Close(), and XrdCl::FileImpl::pStateHandler.

Referenced by ~File(), XrdPosixFile::~XrdPosixFile(), XrdCl::Recorder::Close(), Close(), XrdPosixFile::Close(), and DoTail().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Close() [2/2]

XRootDStatus XrdCl::File::Close ( time_t  timeout = 0)

Close the file - sync

Parameters
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 223 of file XrdClFile.cc.

224  {
225  SyncResponseHandler handler;
226  XRootDStatus st = Close( &handler, timeout );
227  if( !st.IsOK() || st.code == suAlreadyDone )
228  return st;
229 
230  return MessageUtils::WaitForStatus( &handler );
231  }
const uint16_t suAlreadyDone
Definition: XrdClStatus.hh:42

References Close(), XrdCl::Status::code, XrdCl::Status::IsOK(), XrdCl::suAlreadyDone, and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ DelXAttr() [1/2]

XRootDStatus XrdCl::File::DelXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
time_t  timeout = 0 
)

Delete extended attributes - async

Parameters
attrs: list of extended attributes to set
handler: handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttrStatus objects
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 847 of file XrdClFile.cc.

850  {
851  if( pPlugIn )
852  return XRootDStatus( stError, errNotSupported );
853 
854  return FileStateHandler::DelXAttr( pImpl->pStateHandler, attrs, handler, timeout );
855  }
static XRootDStatus DelXAttr(std::shared_ptr< FileStateHandler > &self, const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
const uint16_t errNotSupported
Definition: XrdClStatus.hh:62

References XrdCl::FileStateHandler::DelXAttr(), XrdCl::errNotSupported, XrdCl::FileImpl::pStateHandler, and XrdCl::stError.

Referenced by DelXAttr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DelXAttr() [2/2]

XRootDStatus XrdCl::File::DelXAttr ( const std::vector< std::string > &  attrs,
std::vector< XAttrStatus > &  result,
time_t  timeout = 0 
)

Delete extended attributes - sync

Parameters
attrs: list of extended attributes to set
result: result of the operation
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 860 of file XrdClFile.cc.

863  {
864  SyncResponseHandler handler;
865  XRootDStatus st = DelXAttr( attrs, &handler, timeout );
866  if( !st.IsOK() )
867  return st;
868 
869  std::vector<XAttrStatus> *resp = 0;
870  st = MessageUtils::WaitForResponse( &handler, resp );
871  if( resp ) result.swap( *resp );
872  delete resp;
873 
874  return st;
875  }
XRootDStatus DelXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:847
static XrdCl::XRootDStatus WaitForResponse(SyncResponseHandler *handler, Type *&response)
Wait for the response.

References DelXAttr(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Fcntl() [1/4]

XRootDStatus XrdCl::File::Fcntl ( const Buffer arg,
Buffer *&  response,
time_t  timeout = 0 
)

Performs a custom operation on an open file, server implementation dependent - sync

Parameters
argquery argument
responsethe response (to be deleted by the user)
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 740 of file XrdClFile.cc.

743  {
744  SyncResponseHandler handler;
745  XRootDStatus st = Fcntl( arg, &handler, timeout );
746  if( !st.IsOK() )
747  return st;
748 
749  return MessageUtils::WaitForResponse( &handler, response );
750  }
XRootDStatus Fcntl(const Buffer &arg, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:694

References Fcntl(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Fcntl() [2/4]

XRootDStatus XrdCl::File::Fcntl ( const Buffer arg,
ResponseHandler handler,
time_t  timeout = 0 
)

Performs a custom operation on an open file, server implementation dependent - async

Parameters
argquery argument
handlerhandler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 694 of file XrdClFile.cc.

697  {
698  if( pPlugIn )
699  return pPlugIn->Fcntl( arg, handler, timeout );
700 
701  return FileStateHandler::Fcntl( pImpl->pStateHandler, QueryCode::Code::OpaqueQ, arg, handler, timeout );
702  }
virtual XRootDStatus Fcntl(const Buffer &arg, ResponseHandler *handler, time_t timeout)
static XRootDStatus Fcntl(std::shared_ptr< FileStateHandler > &self, QueryCode::Code queryCode, const Buffer &arg, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FilePlugIn::Fcntl(), XrdCl::FileStateHandler::Fcntl(), and XrdCl::FileImpl::pStateHandler.

Referenced by XrdCl::Recorder::Fcntl(), Fcntl(), and XrdPosixFile::Fcntl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Fcntl() [3/4]

XRootDStatus XrdCl::File::Fcntl ( QueryCode::Code  queryCode,
const Buffer arg,
Buffer *&  response,
time_t  timeout = 0 
)

Performs a custom operation on an open file, server implementation dependent - sync

Parameters
queryCodequery code
argquery argument
responsethe response (to be deleted by the user)
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 708 of file XrdClFile.cc.

712  {
713  SyncResponseHandler handler;
714  XRootDStatus st = Fcntl(queryCode, arg, &handler, timeout );
715  if( !st.IsOK() )
716  return st;
717 
718  return MessageUtils::WaitForResponse( &handler, response );
719  }

References Fcntl(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Fcntl() [4/4]

XRootDStatus XrdCl::File::Fcntl ( QueryCode::Code  queryCode,
const Buffer arg,
ResponseHandler handler,
time_t  timeout = 0 
)

Performs a custom operation on an open file, server implementation dependent - async

Parameters
queryCodequery code
argquery argument
handlerhandler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 725 of file XrdClFile.cc.

729  {
730  if( pPlugIn )
731  return pPlugIn->Fcntl( queryCode, arg, handler, timeout );
732 
733  return FileStateHandler::Fcntl(pImpl->pStateHandler, queryCode, arg, handler, timeout );
734  }

References XrdCl::FilePlugIn::Fcntl(), XrdCl::FileStateHandler::Fcntl(), and XrdCl::FileImpl::pStateHandler.

+ Here is the call graph for this function:

◆ GetProperty()

bool XrdCl::File::GetProperty ( const std::string &  name,
std::string &  value 
) const

Get file property

See also
File::SetProperty for property list

Read-only properties: DataServer [string] - the data server the file is accessed at LastURL [string] - final file URL with all the cgi information

Definition at line 994 of file XrdClFile.cc.

995  {
996  if( pPlugIn )
997  return pPlugIn->GetProperty( name, value );
998 
999  return pImpl->pStateHandler->GetProperty( name, value );
1000  }
virtual bool GetProperty(const std::string &name, std::string &value) const

References XrdCl::FilePlugIn::GetProperty(), and XrdCl::FileImpl::pStateHandler.

Referenced by XrdPosixXrootd::endPoint(), XrdCl::Recorder::GetProperty(), XrdCl::ZipArchive::List(), and XrdPosixFile::Location().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetXAttr() [1/2]

XRootDStatus XrdCl::File::GetXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
time_t  timeout = 0 
)

Get extended attributes - async

Parameters
attrs: list of extended attributes to get
handler: handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttr objects
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 814 of file XrdClFile.cc.

817  {
818  if( pPlugIn )
819  return XRootDStatus( stError, errNotSupported );
820 
821  return FileStateHandler::GetXAttr( pImpl->pStateHandler, attrs, handler, timeout );
822  }
static XRootDStatus GetXAttr(std::shared_ptr< FileStateHandler > &self, const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)

References XrdCl::errNotSupported, XrdCl::FileStateHandler::GetXAttr(), XrdCl::FileImpl::pStateHandler, and XrdCl::stError.

Referenced by GetXAttr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetXAttr() [2/2]

XRootDStatus XrdCl::File::GetXAttr ( const std::vector< std::string > &  attrs,
std::vector< XAttr > &  result,
time_t  timeout = 0 
)

Get extended attributes - sync

Parameters
attrs: list of extended attributes to get
result: result of the operation
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 827 of file XrdClFile.cc.

830  {
831  SyncResponseHandler handler;
832  XRootDStatus st = GetXAttr( attrs, &handler, timeout );
833  if( !st.IsOK() )
834  return st;
835 
836  std::vector<XAttr> *resp = 0;
837  st = MessageUtils::WaitForResponse( &handler, resp );
838  if( resp ) result.swap( *resp );
839  delete resp;
840 
841  return st;
842  }
XRootDStatus GetXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:814

References GetXAttr(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ IsOpen()

bool XrdCl::File::IsOpen ( ) const

Check if the file is open.

Definition at line 962 of file XrdClFile.cc.

963  {
964  if( pPlugIn )
965  return pPlugIn->IsOpen();
966 
967  return pImpl->pStateHandler->IsOpen();
968  }
virtual bool IsOpen() const

References XrdCl::FilePlugIn::IsOpen(), and XrdCl::FileImpl::pStateHandler.

Referenced by ~File(), XrdPosixFile::~XrdPosixFile(), XrdPosixFile::Close(), XrdPosixFile::DelayedDestroy(), XrdPosixXrootd::endPoint(), XrdCl::Recorder::IsOpen(), XrdPosixFile::Location(), and XrdCl::ZipArchive::OpenFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsSecure()

bool XrdCl::File::IsSecure ( ) const

Check if the file is using an encrypted connection.

Definition at line 973 of file XrdClFile.cc.

974  {
975  if( pPlugIn )
976  return false;
977  return pImpl->pStateHandler->IsSecure();
978  }

References XrdCl::FileImpl::pStateHandler.

◆ ListXAttr() [1/2]

XRootDStatus XrdCl::File::ListXAttr ( ResponseHandler handler,
time_t  timeout = 0 
)

List extended attributes - async

Parameters
handler: handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttr objects
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 880 of file XrdClFile.cc.

882  {
883  if( pPlugIn )
884  return XRootDStatus( stError, errNotSupported );
885 
886  return FileStateHandler::ListXAttr( pImpl->pStateHandler, handler, timeout );
887  }
static XRootDStatus ListXAttr(std::shared_ptr< FileStateHandler > &self, ResponseHandler *handler, time_t timeout=0)

References XrdCl::errNotSupported, XrdCl::FileStateHandler::ListXAttr(), XrdCl::FileImpl::pStateHandler, and XrdCl::stError.

Referenced by ListXAttr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ListXAttr() [2/2]

XRootDStatus XrdCl::File::ListXAttr ( std::vector< XAttr > &  result,
time_t  timeout = 0 
)

List extended attributes - sync

Parameters
result: result of the operation
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 892 of file XrdClFile.cc.

894  {
895  SyncResponseHandler handler;
896  XRootDStatus st = ListXAttr( &handler, timeout );
897  if( !st.IsOK() )
898  return st;
899 
900  std::vector<XAttr> *resp = 0;
901  st = MessageUtils::WaitForResponse( &handler, resp );
902  if( resp ) result.swap( *resp );
903  delete resp;
904 
905  return st;
906  }
XRootDStatus ListXAttr(ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:880

References XrdCl::Status::IsOK(), ListXAttr(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Open() [1/2]

XRootDStatus XrdCl::File::Open ( const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode,
ResponseHandler handler,
time_t  timeout = 0 
)

Open the file pointed to by the given URL - async

Parameters
urlurl of the file to be opened
flagsOpenFlags::Flags
modeAccess::Mode for new files, 0 otherwise
handlerhandler to be notified about the status of the operation
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 125 of file XrdClFile.cc.

130  {
131  // Check if we need to install and run a plug-in for this URL
132  InitPlugin(url);
133 
134  if( (flags & OpenFlags::Dup) || (flags & OpenFlags::Samefs) )
135  return XRootDStatus( stError, errInvalidArgs, 0,
136  "Dup or Samefs options require a file template to be specified" );
137 
138  //--------------------------------------------------------------------------
139  // Open the file
140  //--------------------------------------------------------------------------
141  if( pPlugIn )
142  return pPlugIn->Open( url, flags, mode, handler, timeout );
143 
144  return FileStateHandler::Open( pImpl->pStateHandler, url, flags, mode, handler, timeout );
145  }
virtual XRootDStatus Open(const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout)
static XRootDStatus Open(std::shared_ptr< FileStateHandler > &self, const std::string &url, OpenFlags::Flags flags, uint16_t mode, ResponseHandler *handler, time_t timeout=0)
const uint16_t errInvalidArgs
Definition: XrdClStatus.hh:58
@ Samefs
Open file on the same filesystem as another.
@ Dup
Open file duplicating content from another.

References XrdCl::OpenFlags::Dup, XrdCl::errInvalidArgs, XrdCl::FilePlugIn::Open(), XrdCl::FileStateHandler::Open(), XrdCl::FileImpl::pStateHandler, XrdCl::OpenFlags::Samefs, and XrdCl::stError.

Referenced by DoTail(), XrdCl::MetalinkRedirector::Load(), XrdClS3::Filesystem::MkDir(), XrdCl::Recorder::Open(), xrdcl_proxy::ProxyPrefixFile::Open(), and Open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Open() [2/2]

XRootDStatus XrdCl::File::Open ( const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode = Access::None,
time_t  timeout = 0 
)

Open the file pointed to by the given URL - sync

Parameters
urlurl of the file to be opened
flagsOpenFlags::Flags
modeAccess::Mode for new files, 0 otherwise
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 176 of file XrdClFile.cc.

180  {
181  SyncResponseHandler handler;
182  XRootDStatus st = Open( url, flags, mode, &handler, timeout );
183  if( !st.IsOK() )
184  return st;
185 
186  return MessageUtils::WaitForStatus( &handler );
187  }
XRootDStatus Open(const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:125

References XrdCl::Status::IsOK(), Open(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ OpenUsingTemplate() [1/2]

XRootDStatus XrdCl::File::OpenUsingTemplate ( const File rfile,
const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode,
ResponseHandler handler,
time_t  timeout = 0 
)

Open the file pointed to by the given URL - async Alows one to specify template file. Required if using Dup or Samefs flags.

Parameters
rfileFile object of the reference file
urlurl of the file to be opened
flagsOpenFlags::Flags
modeAccess::Mode for new files, 0 otherwise
handlerhandler to be notified about the status of the operation
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 151 of file XrdClFile.cc.

157  {
158  // Check if we need to install and run a plug-in for this URL
159  InitPlugin(url);
160 
161  //--------------------------------------------------------------------------
162  // Open the file
163  //--------------------------------------------------------------------------
164  if( pPlugIn )
165  return pPlugIn->OpenUsingTemplate( rfile.GetFileTemplate().get(), url,
166  flags, mode, handler, timeout );
167 
169  rfile.GetFileTemplate().get(), url, flags,
170  mode, handler, timeout );
171  }
virtual XRootDStatus OpenUsingTemplate(ExportedFileTemplate *templ, const std::string &url, OpenFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, time_t timeout)
static XRootDStatus OpenUsingTemplate(std::shared_ptr< FileStateHandler > &self, ExportedFileTemplate *templ, const std::string &url, OpenFlags::Flags flags, uint16_t mode, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FilePlugIn::OpenUsingTemplate(), XrdCl::FileStateHandler::OpenUsingTemplate(), and XrdCl::FileImpl::pStateHandler.

Referenced by OpenUsingTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OpenUsingTemplate() [2/2]

XRootDStatus XrdCl::File::OpenUsingTemplate ( const File rfile,
const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode = Access::None,
time_t  timeout = 0 
)

Open the file pointed to by the given URL - sync Alows one to specify template file. Required if using Dup or Samefs flags.

Parameters
rfileFile object of the reference file
urlurl of the file to be opened
flagsOpenFlags::Flags
modeAccess::Mode for new files, 0 otherwise
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 193 of file XrdClFile.cc.

198  {
199  SyncResponseHandler handler;
200  XRootDStatus st = OpenUsingTemplate( rfile, url, flags, mode, &handler, timeout );
201  if( !st.IsOK() )
202  return st;
203 
204  return MessageUtils::WaitForStatus( &handler );
205  }
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
Definition: XrdClFile.cc:151

References XrdCl::Status::IsOK(), OpenUsingTemplate(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ PgRead() [1/2]

XRootDStatus XrdCl::File::PgRead ( uint64_t  offset,
uint32_t  size,
void *  buffer,
ResponseHandler handler,
time_t  timeout = 0 
)

Read number of pages at a given offset - async

Parameters
offsetoffset from the beginning of the file
sizebuffer size, at least 1 page big (4KB)
buffera pointer to a buffer big enough to hold the data
handlerhandler to be notified when the response arrives, the response parameter will hold a PageInfo object if the procedure was successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 304 of file XrdClFile.cc.

309  {
310  if( pPlugIn )
311  return pPlugIn->PgRead( offset, size, buffer, handler, timeout );
312 
313  return FileStateHandler::PgRead( pImpl->pStateHandler, offset, size, buffer, handler, timeout );
314  }
virtual XRootDStatus PgRead(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout)
static XRootDStatus PgRead(std::shared_ptr< FileStateHandler > &self, uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileStateHandler::PgRead(), XrdCl::FilePlugIn::PgRead(), and XrdCl::FileImpl::pStateHandler.

Referenced by XrdCl::Recorder::PgRead(), PgRead(), XrdPosixFile::pgRead(), and XrdPosixFile::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PgRead() [2/2]

XRootDStatus XrdCl::File::PgRead ( uint64_t  offset,
uint32_t  size,
void *  buffer,
std::vector< uint32_t > &  cksums,
uint32_t &  bytesRead,
time_t  timeout = 0 
)

Read a data chunk at a given offset - sync

Parameters
offsetoffset from the beginning of the file
sizebuffer size, at least 1 page big (4KB)
buffera pointer to a buffer big enough to hold the data
cksumscrc32c checksum for each read 4KB page
bytesReadnumber of bytes actually read
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 319 of file XrdClFile.cc.

325  {
326  SyncResponseHandler handler;
327  XRootDStatus st = PgRead( offset, size, buffer, &handler, timeout );
328  if( !st.IsOK() )
329  return st;
330 
331  PageInfo *pageInfo = 0;
332  XRootDStatus status = MessageUtils::WaitForResponse( &handler, pageInfo );
333  if( status.IsOK() )
334  {
335  bytesRead = pageInfo->GetLength();
336  cksums = pageInfo->GetCksums();
337  delete pageInfo;
338  }
339  return status;
340  }
XRootDStatus PgRead(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:304

References XrdCl::PageInfo::GetCksums(), XrdCl::PageInfo::GetLength(), XrdCl::Status::IsOK(), PgRead(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ PgWrite() [1/2]

XRootDStatus XrdCl::File::PgWrite ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
std::vector< uint32_t > &  cksums,
ResponseHandler handler,
time_t  timeout = 0 
)

Write number of pages at a given offset - async

Parameters
offsetoffset from the beginning of the file
sizebuffer size
buffera pointer to a buffer holding data pages
cksumsthe crc32c checksums for each 4KB page
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 439 of file XrdClFile.cc.

445  {
446  if( pPlugIn )
447  return pPlugIn->PgWrite( offset, size, buffer, cksums, handler, timeout );
448 
449  return FileStateHandler::PgWrite( pImpl->pStateHandler, offset, size, buffer, cksums, handler, timeout );
450  }
virtual XRootDStatus PgWrite(uint64_t offset, uint32_t nbpgs, const void *buffer, std::vector< uint32_t > &cksums, ResponseHandler *handler, time_t timeout)
static XRootDStatus PgWrite(std::shared_ptr< FileStateHandler > &self, uint64_t offset, uint32_t size, const void *buffer, std::vector< uint32_t > &cksums, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileStateHandler::PgWrite(), XrdCl::FilePlugIn::PgWrite(), and XrdCl::FileImpl::pStateHandler.

Referenced by XrdPosixFile::pgWrite(), XrdCl::Recorder::PgWrite(), and PgWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PgWrite() [2/2]

XRootDStatus XrdCl::File::PgWrite ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
std::vector< uint32_t > &  cksums,
time_t  timeout = 0 
)

Write number of pages at a given offset - sync

Parameters
offsetoffset from the beginning of the file
sizebuffer size
buffera pointer to a buffer holding data pages
cksumsthe crc32c checksums for each 4KB page
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 455 of file XrdClFile.cc.

460  {
461  SyncResponseHandler handler;
462  XRootDStatus st = PgWrite( offset, size, buffer, cksums, &handler, timeout );
463  if( !st.IsOK() )
464  return st;
465 
466  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
467  return status;
468  }
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
Definition: XrdClFile.cc:439

References XrdCl::Status::IsOK(), PgWrite(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ PreRead() [1/2]

XRootDStatus XrdCl::File::PreRead ( const TractList tracts,
ResponseHandler handler,
time_t  timeout = 0 
)

Preread scattered data tracts in one operation - async

Parameters
tractslist of the tracts to preread, no data is returned. The file object must describe an open file. The default maximum tract size is 2097136 bytes and the default maximum number of tracts per request is \024. The server may be queried using FileSystem::Query for the actual settings.
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 527 of file XrdClFile.cc.

530  {
531  if( pPlugIn )
532  return pPlugIn->PreRead( tracts, handler, timeout );
533 
534 //** return FileStateHandler::PreRead( pImpl->pStateHandler, tracts, handler, timeout );
535  return XRootDStatus();
536  }
virtual XRootDStatus PreRead(const TractList &tracts, ResponseHandler *handler, time_t timeout)

References XrdCl::FilePlugIn::PreRead().

Referenced by PreRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PreRead() [2/2]

XRootDStatus XrdCl::File::PreRead ( const TractList tracts,
time_t  timeout = 0 
)

Preread scattered data tracts in one operation - sync

Parameters
tractslist of the tracts to preread, no data is returned. The file object must describe an open file. The default maximum tract size is 2097136 bytes and the default maximum number of tracts per request is 1024. The server may be queried using FileSystem::Query for the actual settings.
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 541 of file XrdClFile.cc.

543  {
544  SyncResponseHandler handler;
545  return PreRead( tracts, &handler, timeout );
546  }
XRootDStatus PreRead(const TractList &tracts, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:527

References PreRead().

+ Here is the call graph for this function:

◆ Read() [1/2]

XRootDStatus XrdCl::File::Read ( uint64_t  offset,
uint32_t  size,
void *  buffer,
ResponseHandler handler,
time_t  timeout = 0 
)

Read a data chunk at a given offset - async

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be read
buffera pointer to a buffer big enough to hold the data or 0 if the buffer should be allocated by the system
handlerhandler to be notified when the response arrives, the response parameter will hold a ChunkInfo object if the procedure was successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 265 of file XrdClFile.cc.

270  {
271  if( pPlugIn )
272  return pPlugIn->Read( offset, size, buffer, handler, timeout );
273 
274  return FileStateHandler::Read( pImpl->pStateHandler, offset, size, buffer, handler, timeout );
275  }
virtual XRootDStatus Read(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout)
static XRootDStatus Read(std::shared_ptr< FileStateHandler > &self, uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::Read(), and XrdCl::FilePlugIn::Read().

Referenced by DoTail(), XrdCl::MetalinkReadHandler::HandleResponse(), XrdCl::MetalinkOpenHandler::HandleResponseWithHosts(), XrdPosixFile::Read(), XrdCl::Recorder::Read(), and Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Read() [2/2]

XRootDStatus XrdCl::File::Read ( uint64_t  offset,
uint32_t  size,
void *  buffer,
uint32_t &  bytesRead,
time_t  timeout = 0 
)

Read a data chunk at a given offset - sync

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be read
buffera pointer to a buffer big enough to hold the data
bytesReadnumber of bytes actually read
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 280 of file XrdClFile.cc.

285  {
286  SyncResponseHandler handler;
287  XRootDStatus st = Read( offset, size, buffer, &handler, timeout );
288  if( !st.IsOK() )
289  return st;
290 
291  ChunkInfo *chunkInfo = 0;
292  XRootDStatus status = MessageUtils::WaitForResponse( &handler, chunkInfo );
293  if( status.IsOK() )
294  {
295  bytesRead = chunkInfo->length;
296  delete chunkInfo;
297  }
298  return status;
299  }
XRootDStatus Read(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:265

References XrdCl::Status::IsOK(), XrdCl::ChunkInfo::length, Read(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ ReadV() [1/2]

XRootDStatus XrdCl::File::ReadV ( uint64_t  offset,
struct iovec *  iov,
int  iovcnt,
ResponseHandler handler,
time_t  timeout = 0 
)

Read data into scattered buffers in one operation - async

Parameters
offsetoffset from the beginning of the file
iovlist of the buffers to be written
iovcntnumber of buffers
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 649 of file XrdClFile.cc.

654  {
655  return FileStateHandler::ReadV( pImpl->pStateHandler, offset, iov, iovcnt, handler, timeout );
656  }
static XRootDStatus ReadV(std::shared_ptr< FileStateHandler > &self, uint64_t offset, struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, and XrdCl::FileStateHandler::ReadV().

Referenced by ReadV().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadV() [2/2]

XRootDStatus XrdCl::File::ReadV ( uint64_t  offset,
struct iovec *  iov,
int  iovcnt,
uint32_t &  bytesRead,
time_t  timeout = 0 
)

Read data into scattered buffers in one operation - sync

Parameters
offsetoffset from the beginning of the file
iovlist of the buffers to be written
iovcntnumber of buffers
bytesReadnumber of bytes actually read
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Read data into scattered buffers in one operation - sync

Parameters
offsetoffset from the beginning of the file
iovlist of the buffers to be written
iovcntnumber of buffers
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 669 of file XrdClFile.cc.

674  {
675  SyncResponseHandler handler;
676  XRootDStatus st = ReadV( offset, iov, iovcnt, &handler, timeout );
677  if( !st.IsOK() )
678  return st;
679 
680  VectorReadInfo *vrInfo = 0;
681  XRootDStatus status = MessageUtils::WaitForResponse( &handler, vrInfo );
682  if( status.IsOK() )
683  {
684  bytesRead = vrInfo->GetSize();
685  delete vrInfo;
686  }
687  return status;
688  }
XRootDStatus ReadV(uint64_t offset, struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:649

References XrdCl::VectorReadInfo::GetSize(), XrdCl::Status::IsOK(), ReadV(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ SetProperty()

bool XrdCl::File::SetProperty ( const std::string &  name,
const std::string &  value 
)

Set file property

File properties: ReadRecovery [true/false] - enable/disable read recovery WriteRecovery [true/false] - enable/disable write recovery FollowRedirects [true/false] - enable/disable following redirections BundledClose [true/false] - enable/disable bundled close

Definition at line 983 of file XrdClFile.cc.

984  {
985  if( pPlugIn )
986  return pPlugIn->SetProperty( name, value );
987 
988  return pImpl->pStateHandler->SetProperty( name, value );
989  }
virtual bool SetProperty(const std::string &name, const std::string &value)

References XrdCl::FileImpl::pStateHandler, and XrdCl::FilePlugIn::SetProperty().

Referenced by XrdClS3::Filesystem::MkDir(), and XrdCl::Recorder::SetProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetXAttr() [1/2]

XRootDStatus XrdCl::File::SetXAttr ( const std::vector< xattr_t > &  attrs,
ResponseHandler handler,
time_t  timeout = 0 
)

Set extended attributes - async

Parameters
attrs: list of extended attributes to set
handler: handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttrStatus objects
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 781 of file XrdClFile.cc.

784  {
785  if( pPlugIn )
786  return XRootDStatus( stError, errNotSupported );
787 
788  return FileStateHandler::SetXAttr( pImpl->pStateHandler, attrs, handler, timeout );
789  }
static XRootDStatus SetXAttr(std::shared_ptr< FileStateHandler > &self, const std::vector< xattr_t > &attrs, ResponseHandler *handler, time_t timeout=0)

References XrdCl::errNotSupported, XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::SetXAttr(), and XrdCl::stError.

Referenced by SetXAttr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetXAttr() [2/2]

XRootDStatus XrdCl::File::SetXAttr ( const std::vector< xattr_t > &  attrs,
std::vector< XAttrStatus > &  result,
time_t  timeout = 0 
)

Set extended attributes - sync

Parameters
attrs: list of extended attributes to set
result: result of the operation
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 794 of file XrdClFile.cc.

797  {
798  SyncResponseHandler handler;
799  XRootDStatus st = SetXAttr( attrs, &handler, timeout );
800  if( !st.IsOK() )
801  return st;
802 
803  std::vector<XAttrStatus> *resp = 0;
804  st = MessageUtils::WaitForResponse( &handler, resp );
805  if( resp ) result.swap( *resp );
806  delete resp;
807 
808  return st;
809  }
XRootDStatus SetXAttr(const std::vector< xattr_t > &attrs, ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:781

References XrdCl::Status::IsOK(), SetXAttr(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Stat() [1/2]

XRootDStatus XrdCl::File::Stat ( bool  force,
ResponseHandler handler,
time_t  timeout = 0 
)

Obtain status information for this file - async

Parameters
forcedo not use the cached information, force re-stating
handlerhandler to be notified when the response arrives, the response parameter will hold a StatInfo object if the procedure is successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 236 of file XrdClFile.cc.

239  {
240  if( pPlugIn )
241  return pPlugIn->Stat( force, handler, timeout );
242 
243  return FileStateHandler::Stat( pImpl->pStateHandler, force, handler, timeout );
244  }
virtual XRootDStatus Stat(bool force, ResponseHandler *handler, time_t timeout)
static XRootDStatus Stat(std::shared_ptr< FileStateHandler > &self, bool force, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FilePlugIn::Stat(), and XrdCl::FileStateHandler::Stat().

Referenced by DoTail(), XrdCl::ZipArchive::List(), XrdCl::Recorder::Stat(), Stat(), and XrdPosixFile::Stat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stat() [2/2]

XRootDStatus XrdCl::File::Stat ( bool  force,
StatInfo *&  response,
time_t  timeout = 0 
)

Obtain status information for this file - sync

Parameters
forcedo not use the cached information, force re-stating
responsethe response (to be deleted by the user)
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 249 of file XrdClFile.cc.

252  {
253  SyncResponseHandler handler;
254  XRootDStatus st = Stat( force, &handler, timeout );
255  if( !st.IsOK() )
256  return st;
257 
258  return MessageUtils::WaitForResponse( &handler, response );
259  }
XRootDStatus Stat(bool force, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:236

References XrdCl::Status::IsOK(), Stat(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Sync() [1/2]

XRootDStatus XrdCl::File::Sync ( ResponseHandler handler,
time_t  timeout = 0 
)

Commit all pending disk writes - async

Parameters
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 473 of file XrdClFile.cc.

475  {
476  if( pPlugIn )
477  return pPlugIn->Sync( handler, timeout );
478 
479  return FileStateHandler::Sync( pImpl->pStateHandler, handler, timeout );
480  }
virtual XRootDStatus Sync(ResponseHandler *handler, time_t timeout)
static XRootDStatus Sync(std::shared_ptr< FileStateHandler > &self, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FilePlugIn::Sync(), and XrdCl::FileStateHandler::Sync().

Referenced by XrdPosixFile::Sync(), XrdCl::Recorder::Sync(), and Sync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Sync() [2/2]

XRootDStatus XrdCl::File::Sync ( time_t  timeout = 0)

Commit all pending disk writes - sync

Parameters
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 485 of file XrdClFile.cc.

486  {
487  SyncResponseHandler handler;
488  XRootDStatus st = Sync( &handler, timeout );
489  if( !st.IsOK() )
490  return st;
491 
492  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
493  return status;
494  }
XRootDStatus Sync(ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:473

References XrdCl::Status::IsOK(), Sync(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ Truncate() [1/2]

XRootDStatus XrdCl::File::Truncate ( uint64_t  size,
ResponseHandler handler,
time_t  timeout = 0 
)

Truncate the file to a particular size - async

Parameters
sizedesired size of the file
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 499 of file XrdClFile.cc.

502  {
503  if( pPlugIn )
504  return pPlugIn->Truncate( size, handler, timeout );
505 
506  return FileStateHandler::Truncate( pImpl->pStateHandler, size, handler, timeout );
507  }
virtual XRootDStatus Truncate(uint64_t size, ResponseHandler *handler, time_t timeout)
static XRootDStatus Truncate(std::shared_ptr< FileStateHandler > &self, uint64_t size, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::Truncate(), and XrdCl::FilePlugIn::Truncate().

Referenced by XrdPosixFile::Trunc(), XrdCl::Recorder::Truncate(), and Truncate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Truncate() [2/2]

XRootDStatus XrdCl::File::Truncate ( uint64_t  size,
time_t  timeout = 0 
)

Truncate the file to a particular size - sync

Parameters
sizedesired size of the file
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 513 of file XrdClFile.cc.

514  {
515  SyncResponseHandler handler;
516  XRootDStatus st = Truncate( size, &handler, timeout );
517  if( !st.IsOK() )
518  return st;
519 
520  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
521  return status;
522  }
XRootDStatus Truncate(uint64_t size, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:499

References XrdCl::Status::IsOK(), Truncate(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ TryOtherServer()

XRootDStatus XrdCl::File::TryOtherServer ( time_t  timeout = 0)

Try different data server

Parameters
timeout: timeout value, if 0 the environment default will be used
Returns
: status of the operation

Definition at line 954 of file XrdClFile.cc.

955  {
956  return FileStateHandler::TryOtherServer( pImpl->pStateHandler, timeout );
957  }
static XRootDStatus TryOtherServer(std::shared_ptr< FileStateHandler > &self, time_t timeout)
Try other data server.

References XrdCl::FileImpl::pStateHandler, and XrdCl::FileStateHandler::TryOtherServer().

+ Here is the call graph for this function:

◆ VectorRead() [1/2]

XRootDStatus XrdCl::File::VectorRead ( const ChunkList chunks,
void *  buffer,
ResponseHandler handler,
time_t  timeout = 0 
)

Read scattered data chunks in one operation - async

Parameters
chunkslist of the chunks to be read and buffers to put the data in. The default maximum chunk size is 2097136 bytes and the default maximum number of chunks per request is 1024. The server may be queried using FileSystem::Query for the actual settings.
bufferif zero the buffer pointers in the chunk list will be used, otherwise it needs to point to a buffer big enough to hold the requested data
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 552 of file XrdClFile.cc.

556  {
557  if( pPlugIn )
558  return pPlugIn->VectorRead( chunks, buffer, handler, timeout );
559 
560  return FileStateHandler::VectorRead( pImpl->pStateHandler, chunks, buffer, handler, timeout );
561  }
virtual XRootDStatus VectorRead(const ChunkList &chunks, void *buffer, ResponseHandler *handler, time_t timeout)
static XRootDStatus VectorRead(std::shared_ptr< FileStateHandler > &self, const ChunkList &chunks, void *buffer, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FilePlugIn::VectorRead(), and XrdCl::FileStateHandler::VectorRead().

Referenced by XrdPosixFile::ReadV(), XrdCl::Recorder::VectorRead(), and VectorRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VectorRead() [2/2]

XRootDStatus XrdCl::File::VectorRead ( const ChunkList chunks,
void *  buffer,
VectorReadInfo *&  vReadInfo,
time_t  timeout = 0 
)

Read scattered data chunks in one operation - sync

Parameters
chunkslist of the chunks to be read and buffers to put the data in. The default maximum chunk size is 2097136 bytes and the default maximum number of chunks per request is 1024. The server may be queried using FileSystem::Query for the actual settings.
bufferif zero the buffer pointers in the chunk list will be used, otherwise it needs to point to a buffer big enough to hold the requested data
vReadInfobuffer size and chunk information
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 566 of file XrdClFile.cc.

570  {
571  SyncResponseHandler handler;
572  XRootDStatus st = VectorRead( chunks, buffer, &handler, timeout );
573  if( !st.IsOK() )
574  return st;
575 
576  return MessageUtils::WaitForResponse( &handler, vReadInfo );
577  }
XRootDStatus VectorRead(const ChunkList &chunks, void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:552

References XrdCl::Status::IsOK(), VectorRead(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ VectorWrite() [1/2]

XRootDStatus XrdCl::File::VectorWrite ( const ChunkList chunks,
ResponseHandler handler,
time_t  timeout = 0 
)

Write scattered data chunks in one operation - async

Parameters
chunkslist of the chunks to be written.
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 582 of file XrdClFile.cc.

585  {
586  if( pPlugIn )
587  return pPlugIn->VectorWrite( chunks, handler, timeout );
588 
589  return FileStateHandler::VectorWrite( pImpl->pStateHandler, chunks, handler, timeout );
590  }
virtual XRootDStatus VectorWrite(const ChunkList &chunks, ResponseHandler *handler, time_t timeout=0)
static XRootDStatus VectorWrite(std::shared_ptr< FileStateHandler > &self, const ChunkList &chunks, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FilePlugIn::VectorWrite(), and XrdCl::FileStateHandler::VectorWrite().

Referenced by XrdCl::Recorder::VectorWrite(), and VectorWrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VectorWrite() [2/2]

XRootDStatus XrdCl::File::VectorWrite ( const ChunkList chunks,
time_t  timeout = 0 
)

Write scattered data chunks in one operation - sync

Parameters
chunkslist of the chunks to be written.
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 595 of file XrdClFile.cc.

597  {
598  SyncResponseHandler handler;
599  XRootDStatus st = VectorWrite( chunks, &handler, timeout );
600  if( !st.IsOK() )
601  return st;
602 
603  return MessageUtils::WaitForStatus( &handler );
604  }
XRootDStatus VectorWrite(const ChunkList &chunks, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:582

References XrdCl::Status::IsOK(), VectorWrite(), and XrdCl::MessageUtils::WaitForStatus().

+ Here is the call graph for this function:

◆ Visa() [1/2]

XRootDStatus XrdCl::File::Visa ( Buffer *&  visa,
time_t  timeout = 0 
)

Get access token to a file - sync

Parameters
visathe access token (to be deleted by the user)
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 767 of file XrdClFile.cc.

769  {
770  SyncResponseHandler handler;
771  XRootDStatus st = Visa( &handler, timeout );
772  if( !st.IsOK() )
773  return st;
774 
775  return MessageUtils::WaitForResponse( &handler, visa );
776  }
XRootDStatus Visa(ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Get access token to a file - async.
Definition: XrdClFile.cc:755

References XrdCl::Status::IsOK(), Visa(), and XrdCl::MessageUtils::WaitForResponse().

+ Here is the call graph for this function:

◆ Visa() [2/2]

XRootDStatus XrdCl::File::Visa ( ResponseHandler handler,
time_t  timeout = 0 
)

Get access token to a file - async.

Get access token to a file - async

Parameters
handlerhandler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 755 of file XrdClFile.cc.

757  {
758  if( pPlugIn )
759  return pPlugIn->Visa( handler, timeout );
760 
761  return FileStateHandler::Visa( pImpl->pStateHandler, handler, timeout );
762  }
virtual XRootDStatus Visa(ResponseHandler *handler, time_t timeout)
static XRootDStatus Visa(std::shared_ptr< FileStateHandler > &self, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FilePlugIn::Visa(), and XrdCl::FileStateHandler::Visa().

Referenced by Visa(), and XrdCl::Recorder::Visa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Write() [1/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
Buffer &&  buffer,
ResponseHandler handler,
time_t  timeout = 0 
)

Write a data chunk at a given offset - async

Parameters
offsetoffset from the beginning of the file
bufferr-value reference to Buffer object, in this case XrdCl runtime takes ownership of the buffer
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 375 of file XrdClFile.cc.

379  {
380  if( pPlugIn )
381  return pPlugIn->Write( offset, std::move( buffer ), handler, timeout );
382 
383  return FileStateHandler::Write( pImpl->pStateHandler, offset, std::move( buffer ), handler, timeout );
384  }
virtual XRootDStatus Write(uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, time_t timeout)
static XRootDStatus Write(std::shared_ptr< FileStateHandler > &self, uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::Write(), and XrdCl::FilePlugIn::Write().

+ Here is the call graph for this function:

◆ Write() [2/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
Buffer &&  buffer,
time_t  timeout = 0 
)

Write a data chunk at a given offset - sync

Parameters
offsetoffset from the beginning of the file
bufferr-value reference to Buffer object, in this case XrdCl runtime takes ownership of the buffer
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 389 of file XrdClFile.cc.

392  {
393  SyncResponseHandler handler;
394  XRootDStatus st = Write( offset, std::move( buffer ), &handler, timeout );
395  if( !st.IsOK() )
396  return st;
397 
398  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
399  return status;
400  }
XRootDStatus Write(uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, time_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition: XrdClFile.cc:345

References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().

+ Here is the call graph for this function:

◆ Write() [3/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
ResponseHandler handler,
time_t  timeout = 0 
)

Write a data chunk at a given offset - async The call interprets and returns the server response, which may be either a success or a failure, it does not contain the number of bytes that were actually written.

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be written
buffera pointer to the buffer holding the data to be written
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 345 of file XrdClFile.cc.

350  {
351  if( pPlugIn )
352  return pPlugIn->Write( offset, size, buffer, handler, timeout );
353 
354  return FileStateHandler::Write( pImpl->pStateHandler, offset, size, buffer, handler, timeout );
355  }

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::Write(), and XrdCl::FilePlugIn::Write().

Referenced by XrdPosixFile::Write(), XrdCl::Recorder::Write(), and Write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Write() [4/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
time_t  timeout = 0 
)

Write a data chunk at a given offset - sync The call interprets and returns the server response, which may be either a success or a failure, it does not contain the number of bytes that were actually written.

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be written
buffera pointer to the buffer holding the data to be written
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 360 of file XrdClFile.cc.

364  {
365  SyncResponseHandler handler;
366  XRootDStatus st = Write( offset, size, buffer, &handler, timeout );
367  if( !st.IsOK() )
368  return st;
369 
370  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
371  return status;
372  }

References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().

+ Here is the call graph for this function:

◆ Write() [5/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
Optional< uint64_t >  fdoff,
int  fd,
ResponseHandler handler,
time_t  timeout = 0 
)

Write a data from a given file descriptor at a given offset - async

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be written
fdoffoffset of the data to be written from the file descriptor (optional, if not provided will copy data from the file descriptor at the current cursor position)
fdfile descriptor open for reading
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 405 of file XrdClFile.cc.

411  {
412  if( pPlugIn )
413  return pPlugIn->Write( offset, size, fdoff, fd, handler, timeout );
414 
415  return FileStateHandler::Write( pImpl->pStateHandler, offset, size, fdoff, fd, handler, timeout );
416  }

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::Write(), and XrdCl::FilePlugIn::Write().

+ Here is the call graph for this function:

◆ Write() [6/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
Optional< uint64_t >  fdoff,
int  fd,
time_t  timeout = 0 
)

Write a data from a given file descriptor at a given offset - sync

Parameters
offsetoffset from the beginning of the file
sizenumber of bytes to be written
fdoffoffset of the data to be written from the file descriptor (optional, if not provided will copy data from the file descriptor at the current cursor position)
fdfile descriptor open for reading
timeouttimeout value, if 0 the environment default will be used
Returns
status of the operation

Definition at line 421 of file XrdClFile.cc.

426  {
427  SyncResponseHandler handler;
428  XRootDStatus st = Write( offset, size, fdoff, fd, &handler, timeout );
429  if( !st.IsOK() )
430  return st;
431 
432  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
433  return status;
434  }

References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().

+ Here is the call graph for this function:

◆ WriteV() [1/2]

XRootDStatus XrdCl::File::WriteV ( uint64_t  offset,
const struct iovec *  iov,
int  iovcnt,
ResponseHandler handler,
time_t  timeout = 0 
)

Write scattered buffers in one operation - async

Parameters
offsetoffset from the beginning of the file
iovlist of the buffers to be written
iovcntnumber of buffers
handlerhandler to be notified when the response arrives
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 609 of file XrdClFile.cc.

614  {
615  if( pPlugIn )
616  return pPlugIn->WriteV( offset, iov, iovcnt, handler, timeout );
617 
618  return FileStateHandler::WriteV( pImpl->pStateHandler, offset, iov, iovcnt, handler, timeout );
619  }
virtual XRootDStatus WriteV(uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
static XRootDStatus WriteV(std::shared_ptr< FileStateHandler > &self, uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)

References XrdCl::FileImpl::pStateHandler, XrdCl::FileStateHandler::WriteV(), and XrdCl::FilePlugIn::WriteV().

Referenced by WriteV().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteV() [2/2]

XRootDStatus XrdCl::File::WriteV ( uint64_t  offset,
const struct iovec *  iov,
int  iovcnt,
time_t  timeout = 0 
)

Write scattered buffers in one operation - sync

Parameters
offsetoffset from the beginning of the file
iovlist of the buffers to
iovcntnumber of buffers
timeouttimeout value, if 0 then the environment default will be used
Returns
status of the operation

Definition at line 624 of file XrdClFile.cc.

628  {
629  SyncResponseHandler handler;
630  XRootDStatus st = WriteV( offset, iov, iovcnt, &handler, timeout );
631  if( !st.IsOK() )
632  return st;
633 
634  XRootDStatus status = MessageUtils::WaitForStatus( &handler );
635  return status;
636  }
XRootDStatus WriteV(uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, time_t timeout=0)
Definition: XrdClFile.cc:609

References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and WriteV().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ CheckpointImpl

template<bool HasHndl>
friend class CheckpointImpl
friend

Definition at line 950 of file XrdClFile.hh.

◆ ChkptWrtImpl

template<bool HasHndl>
friend class ChkptWrtImpl
friend

Definition at line 953 of file XrdClFile.hh.

◆ ChkptWrtVImpl

template<bool HasHndl>
friend class ChkptWrtVImpl
friend

Definition at line 956 of file XrdClFile.hh.

◆ CloneLocations

friend struct CloneLocations
friend

Definition at line 54 of file XrdClFile.hh.


The documentation for this class was generated from the following files: