XrdCl::FileSystem Class Reference

Send file/filesystem queries to an XRootD cluster. More...

#include <XrdClFileSystem.hh>

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

List of all members.

Public Types

typedef std::vector< LocationInfoLocationList
 Location list.

Public Member Functions

 FileSystem (const URL &url, bool enablePlugIns=true)
 ~FileSystem ()
 Destructor.
XRootDStatus Locate (const std::string &path, OpenFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Locate (const std::string &path, OpenFlags::Flags flags, LocationInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus DeepLocate (const std::string &path, OpenFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus DeepLocate (const std::string &path, OpenFlags::Flags flags, LocationInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Mv (const std::string &source, const std::string &dest, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Mv (const std::string &source, const std::string &dest, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Query (QueryCode::Code queryCode, const Buffer &arg, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Query (QueryCode::Code queryCode, const Buffer &arg, Buffer *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Truncate (const std::string &path, uint64_t size, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Truncate (const std::string &path, uint64_t size, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Rm (const std::string &path, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Rm (const std::string &path, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus MkDir (const std::string &path, MkDirFlags::Flags flags, Access::Mode mode, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus MkDir (const std::string &path, MkDirFlags::Flags flags, Access::Mode mode, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus RmDir (const std::string &path, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus RmDir (const std::string &path, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus ChMod (const std::string &path, Access::Mode mode, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus ChMod (const std::string &path, Access::Mode mode, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Ping (ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Ping (uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Stat (const std::string &path, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Stat (const std::string &path, StatInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus StatVFS (const std::string &path, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus StatVFS (const std::string &path, StatInfoVFS *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Protocol (ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Protocol (ProtocolInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus DirList (const std::string &path, DirListFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus DirList (const std::string &path, DirListFlags::Flags flags, DirectoryList *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus SendInfo (const std::string &info, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus SendInfo (const std::string &info, Buffer *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Prepare (const std::vector< std::string > &fileList, PrepareFlags::Flags flags, uint8_t priority, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus Prepare (const std::vector< std::string > &fileList, PrepareFlags::Flags flags, uint8_t priority, Buffer *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
bool SetProperty (const std::string &name, const std::string &value)
bool GetProperty (const std::string &name, std::string &value) const

Private Member Functions

 FileSystem (const FileSystem &other)
FileSystemoperator= (const FileSystem &other)
Status Send (Message *msg, ResponseHandler *handler, MessageSendParams &params)
void AssignLoadBalancer (const URL &url)
void Lock ()
void UnLock ()

Private Attributes

XrdSysMutex pMutex
bool pLoadBalancerLookupDone
bool pFollowRedirects
URLpUrl
FileSystemPlugIn * pPlugIn

Friends

class AssignLBHandler
class ForkHandler

Detailed Description

Send file/filesystem queries to an XRootD cluster.


Member Typedef Documentation

Location list.


Constructor & Destructor Documentation

XrdCl::FileSystem::FileSystem ( const URL url,
bool  enablePlugIns = true 
)

Constructor

Parameters:
url URL of the entry-point server to be contacted
enablePlugIns enable the plug-in mechanism for this object
XrdCl::FileSystem::~FileSystem (  ) 

Destructor.

XrdCl::FileSystem::FileSystem ( const FileSystem other  )  [private]

Member Function Documentation

void XrdCl::FileSystem::AssignLoadBalancer ( const URL url  )  [private]
XRootDStatus XrdCl::FileSystem::ChMod ( const std::string &  path,
Access::Mode  mode,
uint16_t  timeout = 0 
)

Change access mode on a directory or a file - sync

Parameters:
path file/directory path
mode access mode, or'd Access::Mode
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::ChMod ( const std::string &  path,
Access::Mode  mode,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Change access mode on a directory or a file - async

Parameters:
path file/directory path
mode access mode, or'd Access::Mode
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::DeepLocate ( const std::string &  path,
OpenFlags::Flags  flags,
LocationInfo *&  response,
uint16_t  timeout = 0 
)

Locate a file, recursively locate all disk servers - sync

Parameters:
path path to the file to be located
flags some of the OpenFlags::Flags
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::DeepLocate ( const std::string &  path,
OpenFlags::Flags  flags,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Locate a file, recursively locate all disk servers - async

Parameters:
path path to the file to be located
flags some of the OpenFlags::Flags
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
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::DirList ( const std::string &  path,
DirListFlags::Flags  flags,
DirectoryList *&  response,
uint16_t  timeout = 0 
)

List entries of a directory - sync

Parameters:
path directory path
flags DirListFlags
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::DirList ( const std::string &  path,
DirListFlags::Flags  flags,
ResponseHandler handler,
uint16_t  timeout = 0 
)

List entries of a directory - async

Parameters:
path directory path
flags currently unused
handler handler to be notified when the response arrives, the response parameter will hold a DirectoryList object if the procedure is successful
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
bool XrdCl::FileSystem::GetProperty ( const std::string &  name,
std::string &  value 
) const

Get filesystem property

See also:
FileSystem::SetProperty for property list
XRootDStatus XrdCl::FileSystem::Locate ( const std::string &  path,
OpenFlags::Flags  flags,
LocationInfo *&  response,
uint16_t  timeout = 0 
)

Locate a file - sync

Parameters:
path path to the file to be located
flags some of the OpenFlags::Flags
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Locate ( const std::string &  path,
OpenFlags::Flags  flags,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Locate a file - async

Parameters:
path path to the file to be located
flags some of the OpenFlags::Flags
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
Returns:
status of the operation
void XrdCl::FileSystem::Lock (  )  [inline, private]
XRootDStatus XrdCl::FileSystem::MkDir ( const std::string &  path,
MkDirFlags::Flags  flags,
Access::Mode  mode,
uint16_t  timeout = 0 
)

Create a directory - sync

Parameters:
path path to the directory
flags or'd MkDirFlags
mode access mode, or'd Access::Mode
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::MkDir ( const std::string &  path,
MkDirFlags::Flags  flags,
Access::Mode  mode,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Create a directory - async

Parameters:
path path to the directory
flags or'd MkDirFlags
mode access mode, or'd Access::Mode
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Mv ( const std::string &  source,
const std::string &  dest,
uint16_t  timeout = 0 
)

Move a directory or a file - sync

Parameters:
source the file or directory to be moved
dest the new name
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Mv ( const std::string &  source,
const std::string &  dest,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Move a directory or a file - async

Parameters:
source the file or directory to be moved
dest the new name
handler handler to be notified when the response arrives,
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
FileSystem& XrdCl::FileSystem::operator= ( const FileSystem other  )  [private]
XRootDStatus XrdCl::FileSystem::Ping ( uint16_t  timeout = 0  ) 

Check if the server is alive - sync

Parameters:
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Ping ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Check if the server is alive - async

Parameters:
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Prepare ( const std::vector< std::string > &  fileList,
PrepareFlags::Flags  flags,
uint8_t  priority,
Buffer *&  response,
uint16_t  timeout = 0 
)

Prepare one or more files for access - sync

Parameters:
fileList list of files to be prepared
flags PrepareFlags::Flags
priority priority of the request 0 (lowest) - 3 (highest)
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Prepare ( const std::vector< std::string > &  fileList,
PrepareFlags::Flags  flags,
uint8_t  priority,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Prepare one or more files for access - async

Parameters:
fileList list of files to be prepared
flags PrepareFlags::Flags
priority priority of the request 0 (lowest) - 3 (highest)
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
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Protocol ( ProtocolInfo *&  response,
uint16_t  timeout = 0 
)

Obtain server protocol information - sync

Parameters:
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Protocol ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Obtain server protocol information - async

Parameters:
handler handler to be notified when the response arrives, the response parameter will hold a ProtocolInfo object if the procedure is successful
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Query ( QueryCode::Code  queryCode,
const Buffer arg,
Buffer *&  response,
uint16_t  timeout = 0 
)

Obtain server information - sync

Parameters:
queryCode the query code as specified in the QueryCode struct
arg query argument
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Query ( QueryCode::Code  queryCode,
const Buffer arg,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Obtain server information - async

Parameters:
queryCode the query code as specified in the QueryCode struct
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
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Rm ( const std::string &  path,
uint16_t  timeout = 0 
)

Remove a file - sync

Parameters:
path path to the file to be removed
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Rm ( const std::string &  path,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Remove a file - async

Parameters:
path path to the file to be removed
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::RmDir ( const std::string &  path,
uint16_t  timeout = 0 
)

Remove a directory - sync

Parameters:
path path to the directory to be removed
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::RmDir ( const std::string &  path,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Remove a directory - async

Parameters:
path path to the directory to be removed
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
Status XrdCl::FileSystem::Send ( Message msg,
ResponseHandler handler,
MessageSendParams &  params 
) [private]
XRootDStatus XrdCl::FileSystem::SendInfo ( const std::string &  info,
Buffer *&  response,
uint16_t  timeout = 0 
)

Send info to the server (up to 1024 characters) - sync

Parameters:
info the info string to be sent
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::SendInfo ( const std::string &  info,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Send info to the server (up to 1024 characters)- async

Parameters:
info the info string to be sent
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
Returns:
status of the operation
bool XrdCl::FileSystem::SetProperty ( const std::string &  name,
const std::string &  value 
)

Set filesystem property

Filesystem properties: FollowRedirects [true/false] - enable/disable following redirections

XRootDStatus XrdCl::FileSystem::Stat ( const std::string &  path,
StatInfo *&  response,
uint16_t  timeout = 0 
)

Obtain status information for a path - sync

Parameters:
path file/directory path
response the response (to be deleted by the user only if the procedure is successful)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Stat ( const std::string &  path,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Obtain status information for a path - async

Parameters:
path file/directory path
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
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::StatVFS ( const std::string &  path,
StatInfoVFS *&  response,
uint16_t  timeout = 0 
)

Obtain status information for a Virtual File System - sync

Parameters:
path file/directory path
response the response (to be deleted by the user)
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::StatVFS ( const std::string &  path,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Obtain status information for a Virtual File System - async

Parameters:
path file/directory path
handler handler to be notified when the response arrives, the response parameter will hold a StatInfoVFS object if the procedure is successful
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Truncate ( const std::string &  path,
uint64_t  size,
uint16_t  timeout = 0 
)

Truncate a file - sync

Parameters:
path path to the file to be truncated
size file size
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::FileSystem::Truncate ( const std::string &  path,
uint64_t  size,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Truncate a file - async

Parameters:
path path to the file to be truncated
size file size
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
void XrdCl::FileSystem::UnLock (  )  [inline, private]

Friends And Related Function Documentation

friend class AssignLBHandler [friend]
friend class ForkHandler [friend]

Member Data Documentation

FileSystemPlugIn* XrdCl::FileSystem::pPlugIn [private]

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

Generated on 11 Nov 2016 for xrootd by  doxygen 1.6.1