A file. More...
#include <XrdClFile.hh>
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. | |
| 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. | |
| bool | IsSecure () const |
| Check if the file is using an encrypted connection. | |
| 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. | |
| 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 |
A file.
Definition at line 51 of file XrdClFile.hh.
| Enumerator | |
|---|---|
| EnableVirtRedirect | |
| DisableVirtRedirect | |
Definition at line 56 of file XrdClFile.hh.
| XrdCl::File::File | ( | bool | enablePlugIns = true | ) |
Constructor
| enablePlugIns | enable the plug-in mechanism for the object |
Definition at line 59 of file XrdClFile.cc.
Referenced by OpenUsingTemplate(), and OpenUsingTemplate().
| XrdCl::File::File | ( | VirtRedirect | virtRedirect, |
| bool | enablePlugIns = true ) |
Constructor
| virtRedirect | |
| enablePlugIns |
Definition at line 69 of file XrdClFile.cc.
References EnableVirtRedirect.
| XrdCl::File::File | ( | const std::string & | url, |
| bool | enablePlugIns = true ) |
Constructor
| url | URL for the file to initialise the plugin for |
| enablePlugIns | enable the plug-in mechanism for the object |
Definition at line 79 of file XrdClFile.cc.
|
virtual |
Destructor.
Definition at line 88 of file XrdClFile.cc.
References Close(), XrdCl::DefaultEnv::GetLog(), XrdCl::DefaultEnv::GetPostMaster(), and IsOpen().
| XRootDStatus XrdCl::File::Clone | ( | const CloneLocations & | locs, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Clone files and ranges specified into the current file - async
| locs | files, source ranges and dest offsets to be cloned |
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 1016 of file XrdClFile.cc.
References CloneLocations.
Referenced by Clone().
| XRootDStatus XrdCl::File::Clone | ( | const CloneLocations & | locs, |
| time_t | timeout = 0 ) |
Clone files and ranges specified into the current file - sync
| locs | files, source ranges and dest offsets to be cloned |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 1027 of file XrdClFile.cc.
References Clone(), CloneLocations, XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::Close | ( | ResponseHandler * | handler, |
| time_t | timeout = 0 ) |
Close the file - async
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 210 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Close().
Referenced by ~File(), Close(), and DoTail().
| XRootDStatus XrdCl::File::Close | ( | time_t | timeout = 0 | ) |
Close the file - sync
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 223 of file XrdClFile.cc.
References Close(), XrdCl::Status::code, XrdCl::Status::IsOK(), XrdCl::suAlreadyDone, and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::DelXAttr | ( | const std::vector< std::string > & | attrs, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Delete extended attributes - async
| 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 |
Definition at line 847 of file XrdClFile.cc.
References XrdCl::FileStateHandler::DelXAttr(), XrdCl::errNotSupported, and XrdCl::stError.
Referenced by DelXAttr().
| XRootDStatus XrdCl::File::DelXAttr | ( | const std::vector< std::string > & | attrs, |
| std::vector< XAttrStatus > & | result, | ||
| time_t | timeout = 0 ) |
Delete extended attributes - sync
| attrs | : list of extended attributes to set |
| result | : result of the operation |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 860 of file XrdClFile.cc.
References DelXAttr(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| arg | query argument |
| response | the response (to be deleted by the user) |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 740 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| arg | query argument |
| handler | handler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 694 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Fcntl(), and XrdCl::QueryCode::OpaqueQ.
| 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
| queryCode | query code |
| arg | query argument |
| response | the response (to be deleted by the user) |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 708 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| queryCode | query code |
| arg | query argument |
| handler | handler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 725 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Fcntl().
| bool XrdCl::File::GetProperty | ( | const std::string & | name, |
| std::string & | value ) const |
Get file property
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.
Referenced by XrdPosixXrootd::endPoint().
| XRootDStatus XrdCl::File::GetXAttr | ( | const std::vector< std::string > & | attrs, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Get extended attributes - async
| 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 |
Definition at line 814 of file XrdClFile.cc.
References XrdCl::errNotSupported, XrdCl::FileStateHandler::GetXAttr(), and XrdCl::stError.
Referenced by GetXAttr().
| XRootDStatus XrdCl::File::GetXAttr | ( | const std::vector< std::string > & | attrs, |
| std::vector< XAttr > & | result, | ||
| time_t | timeout = 0 ) |
Get extended attributes - sync
| attrs | : list of extended attributes to get |
| result | : result of the operation |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 827 of file XrdClFile.cc.
References GetXAttr(), XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().
| bool XrdCl::File::IsOpen | ( | ) | const |
Check if the file is open.
Definition at line 962 of file XrdClFile.cc.
Referenced by ~File(), XrdPosixFile::DelayedDestroy(), XrdPosixXrootd::endPoint(), and XrdCl::ZipArchive::ReadFromImpl.
| bool XrdCl::File::IsSecure | ( | ) | const |
Check if the file is using an encrypted connection.
Definition at line 973 of file XrdClFile.cc.
| XRootDStatus XrdCl::File::ListXAttr | ( | ResponseHandler * | handler, |
| time_t | timeout = 0 ) |
List extended attributes - async
| 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 |
Definition at line 880 of file XrdClFile.cc.
References XrdCl::errNotSupported, XrdCl::FileStateHandler::ListXAttr(), and XrdCl::stError.
Referenced by ListXAttr().
| XRootDStatus XrdCl::File::ListXAttr | ( | std::vector< XAttr > & | result, |
| time_t | timeout = 0 ) |
List extended attributes - sync
| result | : result of the operation |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 892 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), ListXAttr(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| url | url of the file to be opened |
| flags | OpenFlags::Flags |
| mode | Access::Mode for new files, 0 otherwise |
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 125 of file XrdClFile.cc.
References XrdCl::OpenFlags::Dup, XrdCl::errInvalidArgs, XrdCl::FileStateHandler::Open(), XrdCl::OpenFlags::Samefs, and XrdCl::stError.
Referenced by DoTail(), XrdClS3::Filesystem::MkDir(), and Open().
| 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
| url | url of the file to be opened |
| flags | OpenFlags::Flags |
| mode | Access::Mode for new files, 0 otherwise |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 176 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), Open(), and XrdCl::MessageUtils::WaitForStatus().
| 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.
| rfile | File object of the reference file |
| url | url of the file to be opened |
| flags | OpenFlags::Flags |
| mode | Access::Mode for new files, 0 otherwise |
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 151 of file XrdClFile.cc.
References File(), and XrdCl::FileStateHandler::OpenUsingTemplate().
Referenced by OpenUsingTemplate().
| 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.
| rfile | File object of the reference file |
| url | url of the file to be opened |
| flags | OpenFlags::Flags |
| mode | Access::Mode for new files, 0 otherwise |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 193 of file XrdClFile.cc.
References File(), XrdCl::Status::IsOK(), OpenUsingTemplate(), and XrdCl::MessageUtils::WaitForStatus().
| 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
| offset | offset from the beginning of the file |
| size | buffer size, at least 1 page big (4KB) |
| buffer | a pointer to a buffer big enough to hold the data |
| handler | handler to be notified when the response arrives, the response parameter will hold a PageInfo object if the procedure was successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 304 of file XrdClFile.cc.
References XrdCl::FileStateHandler::PgRead().
Referenced by PgRead().
| 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
| offset | offset from the beginning of the file |
| size | buffer size, at least 1 page big (4KB) |
| buffer | a pointer to a buffer big enough to hold the data |
| cksums | crc32c checksum for each read 4KB page |
| bytesRead | number of bytes actually read |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 319 of file XrdClFile.cc.
References XrdCl::PageInfo::GetCksums(), XrdCl::PageInfo::GetLength(), XrdCl::Status::IsOK(), PgRead(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| offset | offset from the beginning of the file |
| size | buffer size |
| buffer | a pointer to a buffer holding data pages |
| cksums | the crc32c checksums for each 4KB page |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 439 of file XrdClFile.cc.
References XrdCl::FileStateHandler::PgWrite().
Referenced by PgWrite().
| 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
| offset | offset from the beginning of the file |
| size | buffer size |
| buffer | a pointer to a buffer holding data pages |
| cksums | the crc32c checksums for each 4KB page |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 455 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), PgWrite(), and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::PreRead | ( | const TractList & | tracts, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Preread scattered data tracts in one operation - async
| tracts | list 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. |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 527 of file XrdClFile.cc.
Referenced by PreRead().
| XRootDStatus XrdCl::File::PreRead | ( | const TractList & | tracts, |
| time_t | timeout = 0 ) |
Preread scattered data tracts in one operation - sync
| tracts | list 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. |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 541 of file XrdClFile.cc.
References PreRead().
| 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
| offset | offset from the beginning of the file |
| size | number of bytes to be read |
| buffer | a pointer to a buffer big enough to hold the data or 0 if the buffer should be allocated by the system |
| handler | handler to be notified when the response arrives, the response parameter will hold a ChunkInfo object if the procedure was successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 265 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Read().
Referenced by DoTail(), and Read().
| 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
| offset | offset from the beginning of the file |
| size | number of bytes to be read |
| buffer | a pointer to a buffer big enough to hold the data |
| bytesRead | number of bytes actually read |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 280 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), XrdCl::ChunkInfo::length, Read(), and XrdCl::MessageUtils::WaitForResponse().
| 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
| offset | offset from the beginning of the file |
| iov | list of the buffers to be written |
| iovcnt | number of buffers |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 649 of file XrdClFile.cc.
References XrdCl::FileStateHandler::ReadV().
Referenced by ReadV().
| 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
| offset | offset from the beginning of the file |
| iov | list of the buffers to be written |
| iovcnt | number of buffers |
| bytesRead | number of bytes actually read |
| timeout | timeout value, if 0 then the environment default will be used |
Read data into scattered buffers in one operation - sync
| offset | offset from the beginning of the file |
| iov | list of the buffers to be written |
| iovcnt | number of buffers |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 669 of file XrdClFile.cc.
References XrdCl::VectorReadInfo::GetSize(), XrdCl::Status::IsOK(), ReadV(), and XrdCl::MessageUtils::WaitForResponse().
| 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.
Referenced by XrdClS3::Filesystem::MkDir().
| XRootDStatus XrdCl::File::SetXAttr | ( | const std::vector< xattr_t > & | attrs, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Set extended attributes - async
| 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 |
Definition at line 781 of file XrdClFile.cc.
References XrdCl::errNotSupported, XrdCl::FileStateHandler::SetXAttr(), and XrdCl::stError.
Referenced by SetXAttr().
| XRootDStatus XrdCl::File::SetXAttr | ( | const std::vector< xattr_t > & | attrs, |
| std::vector< XAttrStatus > & | result, | ||
| time_t | timeout = 0 ) |
Set extended attributes - sync
| attrs | : list of extended attributes to set |
| result | : result of the operation |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 794 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), SetXAttr(), and XrdCl::MessageUtils::WaitForResponse().
| XRootDStatus XrdCl::File::Stat | ( | bool | force, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Obtain status information for this file - async
| force | do not use the cached information, force re-stating |
| handler | handler to be notified when the response arrives, the response parameter will hold a StatInfo object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 236 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Stat().
Referenced by DoTail().
| XRootDStatus XrdCl::File::Stat | ( | bool | force, |
| StatInfo *& | response, | ||
| time_t | timeout = 0 ) |
Obtain status information for this file - sync
| force | do not use the cached information, force re-stating |
| response | the response (to be deleted by the user) |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 249 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), Stat, and XrdCl::MessageUtils::WaitForResponse().
| XRootDStatus XrdCl::File::Sync | ( | ResponseHandler * | handler, |
| time_t | timeout = 0 ) |
Commit all pending disk writes - async
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 473 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Sync().
Referenced by Sync().
| XRootDStatus XrdCl::File::Sync | ( | time_t | timeout = 0 | ) |
Commit all pending disk writes - sync
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 485 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), Sync(), and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::Truncate | ( | uint64_t | size, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Truncate the file to a particular size - async
| size | desired size of the file |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 499 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Truncate().
Referenced by Truncate().
| XRootDStatus XrdCl::File::Truncate | ( | uint64_t | size, |
| time_t | timeout = 0 ) |
Truncate the file to a particular size - sync
| size | desired size of the file |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 513 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), Truncate(), and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::TryOtherServer | ( | time_t | timeout = 0 | ) |
Try different data server
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 954 of file XrdClFile.cc.
References XrdCl::FileStateHandler::TryOtherServer().
| XRootDStatus XrdCl::File::VectorRead | ( | const ChunkList & | chunks, |
| void * | buffer, | ||
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Read scattered data chunks in one operation - async
| chunks | list 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. |
| buffer | if 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 |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 552 of file XrdClFile.cc.
References XrdCl::FileStateHandler::VectorRead().
Referenced by VectorRead().
| XRootDStatus XrdCl::File::VectorRead | ( | const ChunkList & | chunks, |
| void * | buffer, | ||
| VectorReadInfo *& | vReadInfo, | ||
| time_t | timeout = 0 ) |
Read scattered data chunks in one operation - sync
| chunks | list 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. |
| buffer | if 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 |
| vReadInfo | buffer size and chunk information |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 566 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), VectorRead(), and XrdCl::MessageUtils::WaitForResponse().
| XRootDStatus XrdCl::File::VectorWrite | ( | const ChunkList & | chunks, |
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Write scattered data chunks in one operation - async
| chunks | list of the chunks to be written. |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 582 of file XrdClFile.cc.
References XrdCl::FileStateHandler::VectorWrite().
Referenced by VectorWrite().
| XRootDStatus XrdCl::File::VectorWrite | ( | const ChunkList & | chunks, |
| time_t | timeout = 0 ) |
Write scattered data chunks in one operation - sync
| chunks | list of the chunks to be written. |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 595 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), VectorWrite(), and XrdCl::MessageUtils::WaitForStatus().
| XRootDStatus XrdCl::File::Visa | ( | Buffer *& | visa, |
| time_t | timeout = 0 ) |
Get access token to a file - sync
| visa | the access token (to be deleted by the user) |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 767 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), and XrdCl::MessageUtils::WaitForResponse().
| XRootDStatus XrdCl::File::Visa | ( | ResponseHandler * | handler, |
| time_t | timeout = 0 ) |
Get access token to a file - async.
Get access token to a file - async
| handler | handler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 755 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Visa().
| XRootDStatus XrdCl::File::Write | ( | uint64_t | offset, |
| Buffer && | buffer, | ||
| ResponseHandler * | handler, | ||
| time_t | timeout = 0 ) |
Write a data chunk at a given offset - async
| offset | offset from the beginning of the file |
| buffer | r-value reference to Buffer object, in this case XrdCl runtime takes ownership of the buffer |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 375 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Write().
| XRootDStatus XrdCl::File::Write | ( | uint64_t | offset, |
| Buffer && | buffer, | ||
| time_t | timeout = 0 ) |
Write a data chunk at a given offset - sync
| offset | offset from the beginning of the file |
| buffer | r-value reference to Buffer object, in this case XrdCl runtime takes ownership of the buffer |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 389 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().
| 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.
| offset | offset from the beginning of the file |
| size | number of bytes to be written |
| buffer | a pointer to the buffer holding the data to be written |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 345 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Write().
Referenced by Write(), Write(), and Write().
| 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.
| offset | offset from the beginning of the file |
| size | number of bytes to be written |
| buffer | a pointer to the buffer holding the data to be written |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 360 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().
| 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
| offset | offset from the beginning of the file |
| size | number of bytes to be written |
| fdoff | offset 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) |
| fd | file descriptor open for reading |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 405 of file XrdClFile.cc.
References XrdCl::FileStateHandler::Write().
| 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
| offset | offset from the beginning of the file |
| size | number of bytes to be written |
| fdoff | offset 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) |
| fd | file descriptor open for reading |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 421 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and Write().
| 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
| offset | offset from the beginning of the file |
| iov | list of the buffers to be written |
| iovcnt | number of buffers |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 609 of file XrdClFile.cc.
References XrdCl::FileStateHandler::WriteV().
Referenced by WriteV().
| XRootDStatus XrdCl::File::WriteV | ( | uint64_t | offset, |
| const struct iovec * | iov, | ||
| int | iovcnt, | ||
| time_t | timeout = 0 ) |
Write scattered buffers in one operation - sync
| offset | offset from the beginning of the file |
| iov | list of the buffers to |
| iovcnt | number of buffers |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 624 of file XrdClFile.cc.
References XrdCl::Status::IsOK(), XrdCl::MessageUtils::WaitForStatus(), and WriteV().
|
friend |
Definition at line 950 of file XrdClFile.hh.
References CheckpointImpl.
Referenced by CheckpointImpl.
|
friend |
|
friend |
|
friend |
Definition at line 54 of file XrdClFile.hh.
References CloneLocations.
Referenced by Clone(), Clone(), and CloneLocations.