xrootd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
XrdCl::File Class Reference

A file. More...

#include <XrdClFile.hh>

Collaboration diagram for XrdCl::File:
Collaboration graph
[legend]

Public Types

enum  VirtRedirect { EnableVirtRedirect , DisableVirtRedirect }
 

Public Member Functions

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

Private Member Functions

XRootDStatus Checkpoint (kXR_char code, ResponseHandler *handler, uint16_t timeout=0)
 
XRootDStatus ChkptWrt (uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0)
 
XRootDStatus ChkptWrtV (uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, uint16_t timeout=0)
 

Private Attributes

FileImpl * pImpl
 
FilePlugInpPlugIn
 
bool pEnablePlugIns
 

Friends

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

Detailed Description

A file.

Member Enumeration Documentation

◆ VirtRedirect

Enumerator
EnableVirtRedirect 
DisableVirtRedirect 

Constructor & Destructor Documentation

◆ File() [1/2]

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

Constructor.

◆ File() [2/2]

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

Constructor.

◆ ~File()

virtual XrdCl::File::~File ( )
virtual

Destructor.

Member Function Documentation

◆ Checkpoint()

XRootDStatus XrdCl::File::Checkpoint ( kXR_char  code,
ResponseHandler handler,
uint16_t  timeout = 0 
)
private

Create a checkpoint - 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

◆ ChkptWrt()

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

Checkpointed write - async

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

◆ ChkptWrtV()

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

Checkpointed WriteV - 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

◆ Close() [1/2]

XRootDStatus XrdCl::File::Close ( ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Close(), and xrdcl_proxy::ProxyPrefixFile::Close().

◆ Close() [2/2]

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

Close the file - sync

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

◆ DelXAttr() [1/2]

XRootDStatus XrdCl::File::DelXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
uint16_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

◆ DelXAttr() [2/2]

XRootDStatus XrdCl::File::DelXAttr ( const std::vector< std::string > &  attrs,
std::vector< XAttrStatus > &  result,
uint16_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

◆ Fcntl() [1/2]

XRootDStatus XrdCl::File::Fcntl ( const Buffer arg,
Buffer *&  response,
uint16_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

◆ Fcntl() [2/2]

XRootDStatus XrdCl::File::Fcntl ( const Buffer arg,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Fcntl(), and xrdcl_proxy::ProxyPrefixFile::Fcntl().

◆ 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

Referenced by XrdCl::XCpSrc::FilesEqual(), XrdCl::ZipArchive::GetProperty(), XrdCl::Recorder::GetProperty(), and xrdcl_proxy::ProxyPrefixFile::GetProperty().

◆ GetXAttr() [1/2]

XRootDStatus XrdCl::File::GetXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
uint16_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

◆ GetXAttr() [2/2]

XRootDStatus XrdCl::File::GetXAttr ( const std::vector< std::string > &  attrs,
std::vector< XAttr > &  result,
uint16_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

◆ IsOpen()

bool XrdCl::File::IsOpen ( ) const

◆ IsSecure()

bool XrdCl::File::IsSecure ( ) const

Check if the file is using an encrypted connection.

Referenced by XrdCl::ZipArchive::IsSecure().

◆ ListXAttr() [1/2]

XRootDStatus XrdCl::File::ListXAttr ( ResponseHandler handler,
uint16_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

◆ ListXAttr() [2/2]

XRootDStatus XrdCl::File::ListXAttr ( std::vector< XAttr > &  result,
uint16_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

◆ Open() [1/2]

XRootDStatus XrdCl::File::Open ( const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Open().

◆ Open() [2/2]

XRootDStatus XrdCl::File::Open ( const std::string &  url,
OpenFlags::Flags  flags,
Access::Mode  mode = Access::None,
uint16_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

◆ PgRead() [1/2]

XRootDStatus XrdCl::File::PgRead ( uint64_t  offset,
uint32_t  size,
void *  buffer,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::PgRead(), and xrdcl_proxy::ProxyPrefixFile::PgRead().

◆ PgRead() [2/2]

XRootDStatus XrdCl::File::PgRead ( uint64_t  offset,
uint32_t  size,
void *  buffer,
std::vector< uint32_t > &  cksums,
uint32_t &  bytesRead,
uint16_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

◆ PgWrite() [1/2]

XRootDStatus XrdCl::File::PgWrite ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
std::vector< uint32_t > &  cksums,
ResponseHandler handler,
uint16_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

Referenced by xrdcl_proxy::ProxyPrefixFile::PgWrite(), and XrdCl::Recorder::PgWrite().

◆ PgWrite() [2/2]

XRootDStatus XrdCl::File::PgWrite ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
std::vector< uint32_t > &  cksums,
uint16_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

◆ Read() [1/2]

XRootDStatus XrdCl::File::Read ( uint64_t  offset,
uint32_t  size,
void *  buffer,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Read(), and xrdcl_proxy::ProxyPrefixFile::Read().

◆ Read() [2/2]

XRootDStatus XrdCl::File::Read ( uint64_t  offset,
uint32_t  size,
void *  buffer,
uint32_t &  bytesRead,
uint16_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

◆ ReadV() [1/2]

XRootDStatus XrdCl::File::ReadV ( uint64_t  offset,
struct iovec *  iov,
int  iovcnt,
ResponseHandler handler,
uint16_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

◆ ReadV() [2/2]

XRootDStatus XrdCl::File::ReadV ( uint64_t  offset,
struct iovec *  iov,
int  iovcnt,
uint32_t &  bytesRead,
uint16_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

◆ 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

Referenced by XrdCl::Recorder::SetProperty(), XrdCl::ZipArchive::SetProperty(), and xrdcl_proxy::ProxyPrefixFile::SetProperty().

◆ SetXAttr() [1/2]

XRootDStatus XrdCl::File::SetXAttr ( const std::vector< xattr_t > &  attrs,
ResponseHandler handler,
uint16_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

◆ SetXAttr() [2/2]

XRootDStatus XrdCl::File::SetXAttr ( const std::vector< xattr_t > &  attrs,
std::vector< XAttrStatus > &  result,
uint16_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

◆ Stat() [1/2]

XRootDStatus XrdCl::File::Stat ( bool  force,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::ZipArchive::make_stat(), XrdCl::Recorder::Stat(), and xrdcl_proxy::ProxyPrefixFile::Stat().

◆ Stat() [2/2]

XRootDStatus XrdCl::File::Stat ( bool  force,
StatInfo *&  response,
uint16_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

◆ Sync() [1/2]

XRootDStatus XrdCl::File::Sync ( ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Sync(), and xrdcl_proxy::ProxyPrefixFile::Sync().

◆ Sync() [2/2]

XRootDStatus XrdCl::File::Sync ( uint16_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

◆ Truncate() [1/2]

XRootDStatus XrdCl::File::Truncate ( uint64_t  size,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::Truncate(), and xrdcl_proxy::ProxyPrefixFile::Truncate().

◆ Truncate() [2/2]

XRootDStatus XrdCl::File::Truncate ( uint64_t  size,
uint16_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

◆ TryOtherServer()

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

Try different data server

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

◆ VectorRead() [1/2]

XRootDStatus XrdCl::File::VectorRead ( const ChunkList chunks,
void *  buffer,
ResponseHandler handler,
uint16_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

Referenced by XrdCl::Recorder::VectorRead(), and xrdcl_proxy::ProxyPrefixFile::VectorRead().

◆ VectorRead() [2/2]

XRootDStatus XrdCl::File::VectorRead ( const ChunkList chunks,
void *  buffer,
VectorReadInfo *&  vReadInfo,
uint16_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

◆ VectorWrite() [1/2]

XRootDStatus XrdCl::File::VectorWrite ( const ChunkList chunks,
ResponseHandler handler,
uint16_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

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

◆ VectorWrite() [2/2]

XRootDStatus XrdCl::File::VectorWrite ( const ChunkList chunks,
uint16_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

◆ Visa() [1/2]

XRootDStatus XrdCl::File::Visa ( Buffer *&  visa,
uint16_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

◆ Visa() [2/2]

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

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

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

◆ Write() [1/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
Buffer &&  buffer,
ResponseHandler handler,
uint16_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

◆ Write() [2/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
Buffer &&  buffer,
uint16_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

◆ Write() [3/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
ResponseHandler handler,
uint16_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

Referenced by xrdcl_proxy::ProxyPrefixFile::Write(), XrdCl::Recorder::Write(), xrdcl_proxy::ProxyPrefixFile::Write(), and xrdcl_proxy::ProxyPrefixFile::Write().

◆ Write() [4/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
const void *  buffer,
uint16_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

◆ Write() [5/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
Optional< uint64_t >  fdoff,
int  fd,
ResponseHandler handler,
uint16_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

◆ Write() [6/6]

XRootDStatus XrdCl::File::Write ( uint64_t  offset,
uint32_t  size,
Optional< uint64_t >  fdoff,
int  fd,
uint16_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

◆ WriteV() [1/2]

XRootDStatus XrdCl::File::WriteV ( uint64_t  offset,
const struct iovec *  iov,
int  iovcnt,
ResponseHandler handler,
uint16_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

Referenced by xrdcl_proxy::ProxyPrefixFile::WriteV().

◆ WriteV() [2/2]

XRootDStatus XrdCl::File::WriteV ( uint64_t  offset,
const struct iovec *  iov,
int  iovcnt,
uint16_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

Friends And Related Symbol Documentation

◆ CheckpointImpl

template<bool HasHndl>
friend class CheckpointImpl
friend

◆ ChkptWrtImpl

template<bool HasHndl>
friend class ChkptWrtImpl
friend

◆ ChkptWrtVImpl

template<bool HasHndl>
friend class ChkptWrtVImpl
friend

Member Data Documentation

◆ pEnablePlugIns

bool XrdCl::File::pEnablePlugIns
private

◆ pImpl

FileImpl* XrdCl::File::pImpl
private

◆ pPlugIn

FilePlugIn* XrdCl::File::pPlugIn
private

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