Loading...
Searching...
No Matches
XrdCl::FileSystem Class Reference

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

`#include <XrdClFileSystem.hh>`

Collaboration diagram for XrdCl::FileSystem:

## Public Types

typedef std::vector< LocationInfo > | LocationList
| Location list.

## Public Member Functions

| FileSystem (const URL &url, bool enablePlugIns=true)
| ~FileSystem ()
| Destructor.
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 | DeepLocate (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 | DelXAttr (const std::string &path, const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus | DelXAttr (const std::string &path, const std::vector< std::string > &attrs, std::vector< XAttrStatus > &result, uint16_t timeout=0)
XRootDStatus | DirList (const std::string &path, DirListFlags::Flags flags, DirectoryList *&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
bool | GetProperty (const std::string &name, std::string &value) const
XRootDStatus | GetXAttr (const std::string &path, const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus | GetXAttr (const std::string &path, const std::vector< std::string > &attrs, std::vector< XAttr > &result, uint16_t timeout=0)
XRootDStatus | ListXAttr (const std::string &path, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus | ListXAttr (const std::string &path, std::vector< XAttr > &result, uint16_t timeout=0)
XRootDStatus | Locate (const std::string &path, OpenFlags::Flags flags, LocationInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus | Locate (const std::string &path, OpenFlags::Flags flags, ResponseHandler *handler, 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 | 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 | Ping (ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus | Ping (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
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 | Protocol (ProtocolInfo *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
XRootDStatus | Protocol (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 | Query (QueryCode::Code queryCode, const Buffer &arg, ResponseHandler *handler, 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 | 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 | SendCache (const std::string &info, Buffer *&response, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
| Send cache info to the server - sync.
XRootDStatus | SendCache (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
| Send info to the server - sync.
XRootDStatus | SendInfo (const std::string &info, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
bool | SetProperty (const std::string &name, const std::string &value)
XRootDStatus | SetXAttr (const std::string &path, const std::vector< xattr_t > &attrs, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus | SetXAttr (const std::string &path, const std::vector< xattr_t > &attrs, std::vector< XAttrStatus > &result, uint16_t timeout=0)
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 | 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

## Friends

class | AssignLBHandler
class | ForkHandler

## Detailed Description

Send file/filesystem queries to an XRootD cluster.

Definition at line 202 of file XrdClFileSystem.hh.

## Member Typedef Documentation

## LocationList

typedef std::vector<LocationInfo> XrdCl::FileSystem::LocationList

Location list.

Definition at line 208 of file XrdClFileSystem.hh.

## Constructor & Destructor Documentation

## FileSystem()

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

Definition at line 1090 of file XrdClFileSystem.cc.

:
pImpl( new FileSystemImpl( url ) ),
pPlugIn(0)
{
//--------------------------------------------------------------------------
// Check if we need to install a plug-in for this URL
//--------------------------------------------------------------------------
if( enablePlugIns )
{
Log *log = DefaultEnv::GetLog();
std::string urlStr = url.GetURL();
PlugInFactory *fact = DefaultEnv::GetPlugInManager()->GetFactory(urlStr);
if( fact )
{
pPlugIn = fact->CreateFileSystem( urlStr );
if( !pPlugIn )
{
log->Error( FileMsg, "Plug-in factory failed to produce a plug-in "
"for %s, continuing without one", url.GetObfuscatedURL().c_str() );
}
}
}
if( !pPlugIn )
DefaultEnv::GetForkHandler()->RegisterFileSystemObject( this );
}
XrdCl::DefaultEnv::GetPlugInManager
static PlugInManager * GetPlugInManager()
Get plug-in manager.
Definition XrdClDefaultEnv.cc:670
XrdCl::DefaultEnv::GetLog
static Log * GetLog()
Get default log.
Definition XrdClDefaultEnv.cc:493
XrdCl::DefaultEnv::GetForkHandler
static ForkHandler * GetForkHandler()
Get the fork handler.
Definition XrdClDefaultEnv.cc:551
XrdCl::ForkHandler::RegisterFileSystemObject
void RegisterFileSystemObject(FileSystem *fs)
Definition XrdClForkHandler.hh:61
XrdCl::PlugInManager::GetFactory
PlugInFactory * GetFactory(const std::string url)
Definition XrdClPlugInManager.cc:145
XrdCl::FileMsg
const uint64_t FileMsg
Definition XrdClConstants.hh:34
XrdGlobal::Log
XrdSysError Log
Definition XrdConfig.cc:113

References XrdCl::PlugInFactory::CreateFileSystem(), XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::PlugInManager::GetFactory(), XrdCl::DefaultEnv::GetForkHandler(), XrdCl::DefaultEnv::GetLog(), XrdCl::URL::GetObfuscatedURL(), XrdCl::DefaultEnv::GetPlugInManager(), and XrdCl::URL::GetURL().

Referenced by DirList().

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

## ~FileSystem()

XrdCl::FileSystem::~FileSystem | ( |  | ) |

Destructor.

Definition at line 1120 of file XrdClFileSystem.cc.

{
if( !pPlugIn )
{
if( DefaultEnv::GetForkHandler() )
DefaultEnv::GetForkHandler()->UnRegisterFileSystemObject( this );
}
delete pPlugIn;
delete pImpl;
}
XrdCl::ForkHandler::UnRegisterFileSystemObject
void UnRegisterFileSystemObject(FileSystem *fs)
Un-register a file system object.
Definition XrdClForkHandler.hh:70

References XrdCl::DefaultEnv::GetForkHandler(), and XrdCl::ForkHandler::UnRegisterFileSystemObject().

Here is the call graph for this function:

## Member Function Documentation

## ChMod() [1/2]

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

Definition at line 1469 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->ChMod( path, mode, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientChmodRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_chmod;
req->mode = mode;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientChmodRequest::mode
kXR_unt16 mode
Definition XProtocol.hh:193
kXR_chmod
@ kXR_chmod
Definition XProtocol.hh:114
ClientChmodRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:194
ClientChmodRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:191
XrdCl::MessageUtils::ProcessSendParams
static void ProcessSendParams(MessageSendParams &sendParams)
Process sending params.
Definition XrdClMessageUtils.cc:220
XrdCl::MessageUtils::CreateRequest
static void CreateRequest(Message *&msg, Request *&req, uint32_t payloadSize=0)
Create a message.
Definition XrdClMessageUtils.hh:198
XrdCl::XRootDTransport::SetDescription
static void SetDescription(Message *msg)
Get the description of a message.
Definition XrdClXRootDTransport.hh:245
XrdCl::FileSystemData::Send
static XRootDStatus Send(std::shared_ptr< FileSystemData > &fs, Message *msg, ResponseHandler *handler, MessageSendParams &params)
Definition XrdClFileSystem.cc:946

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientChmodRequest::dlen, kXR_chmod, ClientChmodRequest::mode, XrdCl::MessageUtils::ProcessSendParams(), ClientChmodRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoChMod().

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

## ChMod() [2/2]

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

Definition at line 1497 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = ChMod( path, mode, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::MessageUtils::WaitForStatus
static XRootDStatus WaitForStatus(SyncResponseHandler *handler)
Wait and return the status of the query.
Definition XrdClMessageUtils.hh:155
XrdCl::ChMod
ChModImpl< false > ChMod
Definition XrdClFileSystemOperations.hh:521

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

Here is the call graph for this function:

## DeepLocate() [1/2]

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

Definition at line 1192 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = DeepLocate( path, flags, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::MessageUtils::WaitForResponse
static XrdCl::XRootDStatus WaitForResponse(SyncResponseHandler *handler, Type *&response)
Wait for the response.
Definition XrdClMessageUtils.hh:168
XrdCl::DeepLocate
DeepLocateImpl< false > DeepLocate
Definition XrdClFileSystemOperations.hh:184

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

Here is the call graph for this function:

## DeepLocate() [2/2]

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

Definition at line 1180 of file XrdClFileSystem.cc.

{
return Locate( path, flags,
new DeepLocateHandler( handler, path, flags, timeout ), timeout );
}
XrdCl::Locate
LocateImpl< false > Locate
Definition XrdClFileSystemOperations.hh:136

Referenced by DoLocate(), XrdCl::FileSystemUtils::GetSpaceInfo(), and XrdFfsPosix_mkdir().

Here is the caller graph for this function:

## DelXAttr() [1/2]

XRootDStatus XrdCl::FileSystem::DelXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2105 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return XRootDStatus( stError, errNotSupported );
return XAttrOperationImpl( kXR_fattrDel, 0, path, attrs, handler, timeout );
}
kXR_fattrDel
@ kXR_fattrDel
Definition XProtocol.hh:270
XrdCl::stError
const uint16_t stError
An error occurred that could potentially be retried.
Definition XrdClStatus.hh:32
XrdCl::errNotSupported
const uint16_t errNotSupported
Definition XrdClStatus.hh:62

References XrdCl::errNotSupported, kXR_fattrDel, and XrdCl::stError.

Referenced by DelXAttr(), and DoXAttr().

Here is the caller graph for this function:

## DelXAttr() [2/2]

XRootDStatus XrdCl::FileSystem::DelXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2119 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
XRootDStatus st = DelXAttr( path, attrs, &handler, timeout );
if( !st.IsOK() )
return st;
std::vector<XAttrStatus> *resp = 0;
st = MessageUtils::WaitForResponse( &handler, resp );
if( resp ) result.swap( *resp );
delete resp;
return st;
}
XrdCl::FileSystem::DelXAttr
XRootDStatus DelXAttr(const std::string &path, const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
Definition XrdClFileSystem.cc:2105

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

Here is the call graph for this function:

## DirList() [1/2]

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

Definition at line 1723 of file XrdClFileSystem.cc.

{
//--------------------------------------------------------------------------
// Chunked response is only possible for async DirList call
//--------------------------------------------------------------------------
if( flags & DirListFlags::Chunked )
return XRootDStatus( stError, errNotSupported );
//--------------------------------------------------------------------------
// If the path ends with '.zip' extension add Zip flag
//--------------------------------------------------------------------------
static const std::string zip_sufix = ".zip";
if( path.size() >= zip_sufix.size() &&
std::equal( zip_sufix.rbegin(), zip_sufix.rend(), path.rbegin() ) )
flags |= DirListFlags::Zip;
//--------------------------------------------------------------------------
// We do the deep locate and ask all the returned servers for the list
//--------------------------------------------------------------------------
if( flags & DirListFlags::Locate )
{
bool isserver = false;
//------------------------------------------------------------------------
// Check if destination is a data server
//------------------------------------------------------------------------
{
AnyObject obj;
XRootDStatus st = DefaultEnv::GetPostMaster()->QueryTransport(
*pImpl->fsdata->pUrl, XRootDQuery::ServerFlags, obj);
if( st.IsOK() )
{
int *ptr = 0;
obj.Get( ptr );
isserver = ( ptr && (*ptr & kXR_isServer) );
delete ptr;
}
}
if (isserver) {
// Just disable the locate flag if we are talking to a single server
flags &= ~DirListFlags::Locate;
} else {
//------------------------------------------------------------------------
// Locate all the disk servers holding the directory
//------------------------------------------------------------------------
LocationInfo *locations;
std::string locatePath = "*"; locatePath += path;
XRootDStatus st = DeepLocate(locatePath,
OpenFlags::PrefName |
OpenFlags::Compress |
OpenFlags::IntentDirList,
locations);
if( !st.IsOK() )
return st;
if( locations->GetSize() == 0 )
{
delete locations;
return XRootDStatus( stError, errNotFound );
}
//------------------------------------------------------------------------
// Ask each server for a directory list
//------------------------------------------------------------------------
flags &= ~DirListFlags::Locate;
FileSystem *fs;
DirectoryList *currentResp = 0;
uint32_t errors = 0;
uint32_t numLocations = locations->GetSize();
bool partial = st.code == suPartial ? true : false;
response = new DirectoryList();
response->SetParentName( path );
for( uint32_t i = 0; i < locations->GetSize(); ++i )
{
URL locationURL( locations->At(i).GetAddress() );
// make sure the original protocol is preserved (root vs roots)
locationURL.SetProtocol( pImpl->fsdata->pUrl->GetProtocol() );
fs = new FileSystem( locationURL );
st = fs->DirList( path, flags, currentResp, timeout );
if( !st.IsOK() )
{
++errors;
delete fs;
continue;
}
if( st.code == suPartial )
partial = true;
DirectoryList::Iterator it;
for( it = currentResp->Begin(); it != currentResp->End(); ++it )
{
response->Add( *it );
*it = 0;
}
delete fs;
delete currentResp;
fs = 0;
currentResp = 0;
}
delete locations;
if( flags & DirListFlags::Merge )
MergeDirListHandler::Merge( response );
if( errors || partial )
{
if( errors == numLocations )
return st;
return XRootDStatus( stOK, suPartial );
}
return XRootDStatus();
}
}
//--------------------------------------------------------------------------
// We just ask the current server
//--------------------------------------------------------------------------
SyncResponseHandler handler;
XRootDStatus st = DirList( path, flags, &handler, timeout );
if( !st.IsOK() )
return st;
st = MessageUtils::WaitForResponse( &handler, response );
if( !st.IsOK() )
return st;
//--------------------------------------------------------------------------
// Do the stats on all the entries if necessary.
// If we already have the stat objects it means that the bulk stat has
// succeeded.
//--------------------------------------------------------------------------
if( !(flags & DirListFlags::Stat) )
return st;
if( response->GetSize() && response->At(0)->GetStatInfo() )
return st;
uint32_t quota = response->GetSize() <= 1024 ? response->GetSize() : 1024;
RequestSync sync( response->GetSize(), quota );
for( uint32_t i = 0; i < response->GetSize(); ++i )
{
std::string fullPath = response->GetParentName()+response->At(i)->GetName();
ResponseHandler *handler = new DirListStatHandler( response, i, &sync );
st = Stat( fullPath, handler, timeout );
if( !st.IsOK() )
{
sync.TaskDone( false );
delete handler;
}
sync.WaitForQuota();
}
sync.WaitForAll();
if( sync.FailureCount() )
return XRootDStatus( stOK, suPartial );
return XRootDStatus();
}
kXR_isServer
#define kXR_isServer
Definition XProtocol.hh:1157
Stat
struct stat Stat
Definition XrdCks.cc:49
XrdCl::DefaultEnv::GetPostMaster
static PostMaster * GetPostMaster()
Get default post master.
Definition XrdClDefaultEnv.cc:453
XrdCl::DirectoryList::Iterator
DirList::iterator Iterator
Directory listing iterator.
Definition XrdClXRootDResponses.hh:752
XrdCl::FileSystem::FileSystem
FileSystem(const URL &url, bool enablePlugIns=true)
Definition XrdClFileSystem.cc:1090
XrdCl::PostMaster::QueryTransport
Status QueryTransport(const URL &url, uint16_t query, AnyObject &result)
Definition XrdClPostMaster.cc:252
XrdCl::suPartial
const uint16_t suPartial
Definition XrdClStatus.hh:41
XrdCl::errNotFound
const uint16_t errNotFound
Definition XrdClStatus.hh:100
XrdCl::stOK
const uint16_t stOK
Everything went OK.
Definition XrdClStatus.hh:31
XrdCl::DirList
DirListImpl< false > DirList
Definition XrdClFileSystemOperations.hh:746
XrdCl::DirListFlags::Stat
@ Stat
Stat each entry.
Definition XrdClFileSystem.hh:158
XrdCl::DirListFlags::Merge
@ Merge
Merge duplicates.
Definition XrdClFileSystem.hh:162
XrdCl::DirListFlags::Zip
@ Zip
List content of ZIP files.
Definition XrdClFileSystem.hh:164
XrdCl::DirListFlags::Locate
@ Locate
Definition XrdClFileSystem.hh:159
XrdCl::DirListFlags::Chunked
@ Chunked
Serve chunked results for better performance.
Definition XrdClFileSystem.hh:163
XrdCl::OpenFlags::Compress
@ Compress
Definition XrdClFileSystem.hh:78
XrdCl::OpenFlags::PrefName
@ PrefName
Definition XrdClFileSystem.hh:105
XrdCl::OpenFlags::IntentDirList
@ IntentDirList
Definition XrdClFileSystem.hh:107
XrdCl::XRootDQuery::ServerFlags
static const uint16_t ServerFlags
returns server flags
Definition XrdClPostMasterInterfaces.hh:290

References FileSystem(), XrdCl::DirectoryList::Add(), XrdCl::DirectoryList::At(), XrdCl::LocationInfo::At(), XrdCl::DirectoryList::Begin(), XrdCl::DirListFlags::Chunked, XrdCl::Status::code, XrdCl::OpenFlags::Compress, DirList(), XrdCl::DirectoryList::End(), XrdCl::errNotFound, XrdCl::errNotSupported, XrdCl::RequestSync::FailureCount(), XrdCl::AnyObject::Get(), XrdCl::LocationInfo::Location::GetAddress(), XrdCl::DirectoryList::ListEntry::GetName(), XrdCl::DirectoryList::GetParentName(), XrdCl::DefaultEnv::GetPostMaster(), XrdCl::DirectoryList::GetSize(), XrdCl::LocationInfo::GetSize(), XrdCl::DirectoryList::ListEntry::GetStatInfo(), XrdCl::OpenFlags::IntentDirList, XrdCl::Status::IsOK(), kXR_isServer, XrdCl::DirListFlags::Locate, Locate(), XrdCl::DirListFlags::Merge, XrdCl::OpenFlags::PrefName, XrdCl::PostMaster::QueryTransport(), XrdCl::XRootDQuery::ServerFlags, XrdCl::DirectoryList::SetParentName(), XrdCl::URL::SetProtocol(), Stat, XrdCl::DirListFlags::Stat, XrdCl::stError, XrdCl::stOK, XrdCl::suPartial, XrdCl::RequestSync::TaskDone(), XrdCl::RequestSync::WaitForAll(), XrdCl::RequestSync::WaitForQuota(), XrdCl::MessageUtils::WaitForResponse(), and XrdCl::DirListFlags::Zip.

Here is the call graph for this function:

## DirList() [2/2]

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

Definition at line 1669 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->DirList( path, flags, handler, timeout );
URL url = URL( path );
std::string fPath = FilterXrdClCgi( path );
if( flags & DirListFlags::Zip )
{
// stat the file to check if it is a directory or a file
// the ZIP handler will take care of the rest
ZipListHandler *zipHandler = new ZipListHandler( *pImpl->fsdata->pUrl, path, flags, handler, timeout );
XRootDStatus st = Stat( path, zipHandler, timeout );
if( !st.IsOK() )
delete zipHandler;
return st;
}
Message *msg;
ClientDirlistRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_dirlist;
req->dlen = fPath.length();
if( ( flags & DirListFlags::Stat ) || ( flags & DirListFlags::Recursive ) )
req->options[0] = kXR_dstat;
if( ( flags & DirListFlags::Cksm ) )
req->options[0] = kXR_dstat | kXR_dcksm;
if( flags & DirListFlags::Recursive )
handler = new RecursiveDirListHandler( *pImpl->fsdata->pUrl, url.GetPath(), flags, handler, timeout );
if( flags & DirListFlags::Merge )
handler = new MergeDirListHandler( flags & DirListFlags::Chunked, handler );
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
if( flags & DirListFlags::Chunked )
params.chunkedResponse = true;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientDirlistRequest::options
kXR_char options[1]
Definition XProtocol.hh:248
ClientDirlistRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:246
kXR_dstat
@ kXR_dstat
Definition XProtocol.hh:240
kXR_dcksm
@ kXR_dcksm
Definition XProtocol.hh:241
kXR_dirlist
@ kXR_dirlist
Definition XProtocol.hh:116
ClientDirlistRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:249
XrdCl::DirListFlags::Recursive
@ Recursive
Do a recursive listing.
Definition XrdClFileSystem.hh:161
XrdCl::DirListFlags::Cksm
@ Cksm
Get checksum for every entry.
Definition XrdClFileSystem.hh:165

References XrdCl::Buffer::Append(), XrdCl::DirListFlags::Chunked, XrdCl::MessageSendParams::chunkedResponse, XrdCl::DirListFlags::Cksm, XrdCl::MessageUtils::CreateRequest(), ClientDirlistRequest::dlen, XrdCl::URL::GetPath(), XrdCl::Status::IsOK(), kXR_dcksm, kXR_dirlist, kXR_dstat, XrdCl::DirListFlags::Merge, ClientDirlistRequest::options, XrdCl::MessageUtils::ProcessSendParams(), XrdCl::DirListFlags::Recursive, ClientDirlistRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), Stat, XrdCl::DirListFlags::Stat, XrdCl::MessageSendParams::timeout, and XrdCl::DirListFlags::Zip.

Referenced by DirList(), DoLS(), and IndexRemote().

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

## GetProperty()

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

Get filesystem property

See also
  FileSystem::SetProperty for property list

Definition at line 2193 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->GetProperty( name, value );
if( name == "FollowRedirects" )
{
if( pImpl->fsdata->pFollowRedirects ) value = "true";
else value = "false";
return true;
}
else if( name == "LastURL" )
{
if( pImpl->fsdata->pLastUrl )
{
value = pImpl->fsdata->pLastUrl->GetURL();
return true;
}
else return false;
}
return false;
}
XrdCl::value
Response NullRef< Response >::value
Definition XrdClOperationHandlers.hh:128

References XrdCl::NullRef< Response >::value.

Referenced by DoLS().

Here is the caller graph for this function:

## GetXAttr() [1/2]

XRootDStatus XrdCl::FileSystem::GetXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2070 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return XRootDStatus( stError, errNotSupported );
return XAttrOperationImpl( kXR_fattrGet, 0, path, attrs, handler, timeout );
}
kXR_fattrGet
@ kXR_fattrGet
Definition XProtocol.hh:271

References XrdCl::errNotSupported, kXR_fattrGet, and XrdCl::stError.

Referenced by DoXAttr(), and GetXAttr().

Here is the caller graph for this function:

## GetXAttr() [2/2]

XRootDStatus XrdCl::FileSystem::GetXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2084 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
XRootDStatus st = GetXAttr( path, attrs, &handler, timeout );
if( !st.IsOK() )
return st;
std::vector<XAttr> *resp = 0;
st = MessageUtils::WaitForResponse( &handler, resp );
if( resp ) result.swap( *resp );
delete resp;
return st;
}
XrdCl::FileSystem::GetXAttr
XRootDStatus GetXAttr(const std::string &path, const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
Definition XrdClFileSystem.cc:2070

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

Here is the call graph for this function:

## ListXAttr() [1/2]

XRootDStatus XrdCl::FileSystem::ListXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2140 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return XRootDStatus( stError, errNotSupported );
static const std::vector<std::string> nothing;
return XAttrOperationImpl( kXR_fattrList, ClientFattrRequest::aData,
path, nothing, handler, timeout );
}
kXR_fattrList
@ kXR_fattrList
Definition XProtocol.hh:272
ClientFattrRequest::aData
static const int aData
Definition XProtocol.hh:298

References ClientFattrRequest::aData, XrdCl::errNotSupported, kXR_fattrList, and XrdCl::stError.

Referenced by DoXAttr(), and ListXAttr().

Here is the caller graph for this function:

## ListXAttr() [2/2]

XRootDStatus XrdCl::FileSystem::ListXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2155 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
XRootDStatus st = ListXAttr( path, &handler, timeout );
if( !st.IsOK() )
return st;
std::vector<XAttr> *resp = 0;
st = MessageUtils::WaitForResponse( &handler, resp );
if( resp ) result.swap( *resp );
delete resp;
return st;
}
XrdCl::FileSystem::ListXAttr
XRootDStatus ListXAttr(const std::string &path, ResponseHandler *handler, uint16_t timeout=0)
Definition XrdClFileSystem.cc:2140

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

Here is the call graph for this function:

## Locate() [1/2]

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

Definition at line 1164 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Locate( path, flags, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}

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

Here is the call graph for this function:

## Locate() [2/2]

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

Definition at line 1135 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Locate( path, flags, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientLocateRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_locate;
req->options = flags;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientLocateRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:345
ClientLocateRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:348
kXR_locate
@ kXR_locate
Definition XProtocol.hh:139
ClientLocateRequest::options
kXR_unt16 options
Definition XProtocol.hh:346

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientLocateRequest::dlen, kXR_locate, ClientLocateRequest::options, XrdCl::MessageUtils::ProcessSendParams(), ClientLocateRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DirList(), and DoLocate().

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

## MkDir() [1/2]

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

Definition at line 1383 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->MkDir( path, flags, mode, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientMkdirRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_mkdir;
req->options[0] = flags;
req->mode = mode;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientMkdirRequest::mode
kXR_unt16 mode
Definition XProtocol.hh:418
kXR_mkdir
@ kXR_mkdir
Definition XProtocol.hh:120
ClientMkdirRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:415
ClientMkdirRequest::options
kXR_char options[1]
Definition XProtocol.hh:416
ClientMkdirRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:419

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientMkdirRequest::dlen, kXR_mkdir, ClientMkdirRequest::mode, ClientMkdirRequest::options, XrdCl::MessageUtils::ProcessSendParams(), ClientMkdirRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoMkDir(), and XrdPosixXrootd::Mkdir().

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

## MkDir() [2/2]

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

Definition at line 1413 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = MkDir( path, flags, mode, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::MkDir
MkDirImpl< false > MkDir
Definition XrdClFileSystemOperations.hh:427

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

Here is the call graph for this function:

## Mv() [1/2]

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

Definition at line 1208 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Mv( source, dest, handler, timeout );
std::string fSource = FilterXrdClCgi( source );
std::string fDest = FilterXrdClCgi( dest );
Message *msg;
ClientMvRequest *req;
MessageUtils::CreateRequest( msg, req, fSource.length() + fDest.length()+1 );
req->requestid = kXR_mv;
req->dlen = fSource.length() + fDest.length()+1;
req->arg1len = fSource.length();
msg->Append( fSource.c_str(), fSource.length(), 24 );
*msg->GetBuffer(24 + fSource.length()) = ' ';
msg->Append( fDest.c_str(), fDest.length(), 25 + fSource.length() );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientMvRequest::arg1len
kXR_int16 arg1len
Definition XProtocol.hh:430
ClientMvRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:431
ClientMvRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:428
kXR_mv
@ kXR_mv
Definition XProtocol.hh:121

References XrdCl::Buffer::Append(), ClientMvRequest::arg1len, XrdCl::MessageUtils::CreateRequest(), ClientMvRequest::dlen, XrdCl::Buffer::GetBuffer(), kXR_mv, XrdCl::MessageUtils::ProcessSendParams(), ClientMvRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoMv(), and XrdPosixXrootd::Rename().

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

## Mv() [2/2]

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

Definition at line 1240 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Mv( source, dest, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::Mv
MvImpl< false > Mv
Definition XrdClFileSystemOperations.hh:232

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

Here is the call graph for this function:

## Ping() [1/2]

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

Definition at line 1512 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Ping( handler, timeout );
Message *msg;
ClientPingRequest *req;
MessageUtils::CreateRequest( msg, req );
req->requestid = kXR_ping;
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientPingRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:546
kXR_ping
@ kXR_ping
Definition XProtocol.hh:123

References XrdCl::MessageUtils::CreateRequest(), kXR_ping, XrdCl::MessageUtils::ProcessSendParams(), ClientPingRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Here is the call graph for this function:

## Ping() [2/2]

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

Definition at line 1533 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Ping( &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::Ping
PingImpl< false > Ping
Definition XrdClFileSystemOperations.hh:560

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

Here is the call graph for this function:

## Prepare() [1/2]

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

Definition at line 2018 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Prepare( fileList, flags, priority, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::Prepare
PrepareImpl< false > Prepare
Definition XrdClFileSystemOperations.hh:843

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

Here is the call graph for this function:

## Prepare() [2/2]

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

Definition at line 1978 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Prepare( fileList, flags, priority, handler, timeout );
std::vector<std::string>::const_iterator it;
std::string list;
for( it = fileList.begin(); it != fileList.end(); ++it )
{
list += *it;
list += "\n";
}
list.erase( list.length()-1, 1 );
Message *msg;
ClientPrepareRequest *req;
MessageUtils::CreateRequest( msg, req, list.length() );
req->requestid = kXR_prepare;
req->options = 0xff & flags;
req->optionX = 0xffff & ( flags >> 8 );
req->prty = priority;
req->dlen = list.length();
msg->Append( list.c_str(), list.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientPrepareRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:601
ClientPrepareRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:607
ClientPrepareRequest::optionX
kXR_unt16 optionX
Definition XProtocol.hh:605
ClientPrepareRequest::options
kXR_char options
Definition XProtocol.hh:602
kXR_prepare
@ kXR_prepare
Definition XProtocol.hh:133
ClientPrepareRequest::prty
kXR_char prty
Definition XProtocol.hh:603

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientPrepareRequest::dlen, kXR_prepare, ClientPrepareRequest::options, ClientPrepareRequest::optionX, XrdCl::MessageUtils::ProcessSendParams(), ClientPrepareRequest::prty, ClientPrepareRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoPrepare().

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

## Protocol() [1/2]

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

Definition at line 1655 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Protocol( &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::Protocol
ProtocolImpl< false > Protocol
Definition XrdClFileSystemOperations.hh:698

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

Here is the call graph for this function:

## Protocol() [2/2]

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

Definition at line 1633 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Protocol( handler, timeout );
Message *msg;
ClientProtocolRequest *req;
MessageUtils::CreateRequest( msg, req );
req->requestid = kXR_protocol;
req->clientpv = kXR_PROTOCOLVERSION;
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
kXR_protocol
@ kXR_protocol
Definition XProtocol.hh:118
kXR_PROTOCOLVERSION
#define kXR_PROTOCOLVERSION
Definition XProtocol.hh:70
ClientProtocolRequest::clientpv
kXR_int32 clientpv
Definition XProtocol.hh:558
ClientProtocolRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:557

References ClientProtocolRequest::clientpv, XrdCl::MessageUtils::CreateRequest(), kXR_protocol, kXR_PROTOCOLVERSION, XrdCl::MessageUtils::ProcessSendParams(), ClientProtocolRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Here is the call graph for this function:

## Query() [1/2]

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

Definition at line 1281 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Query( queryCode, arg, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::Query
QueryImpl< false > Query
Definition XrdClFileSystemOperations.hh:280

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

Here is the call graph for this function:

## Query() [2/2]

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

Definition at line 1255 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Query( queryCode, arg, handler, timeout );
Message *msg;
ClientQueryRequest *req;
MessageUtils::CreateRequest( msg, req, arg.GetSize() );
req->requestid = kXR_query;
req->infotype = queryCode;
req->dlen = arg.GetSize();
msg->Append( arg.GetBuffer(), arg.GetSize(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientQueryRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:630
ClientQueryRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:635
ClientQueryRequest::infotype
kXR_unt16 infotype
Definition XProtocol.hh:631
kXR_query
@ kXR_query
Definition XProtocol.hh:113

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientQueryRequest::dlen, XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), ClientQueryRequest::infotype, kXR_query, XrdCl::MessageUtils::ProcessSendParams(), ClientQueryRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), DoQuery(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::FileSystemUtils::GetSpaceInfo(), and XrdCl::Utils::GetSupportedCheckSums().

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

## Rm() [1/2]

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

Definition at line 1340 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Rm( path, handler, timeout );
if( pImpl->fsdata->pUrl->IsLocalFile() )
return LocalFS::Instance().Rm( path, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientRmRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_rm;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
kXR_rm
@ kXR_rm
Definition XProtocol.hh:126
ClientRmRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:699
ClientRmRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:697

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientRmRequest::dlen, kXR_rm, XrdCl::MessageUtils::ProcessSendParams(), ClientRmRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by XrdCl::ClassicCopyJob::Run(), and XrdPosixXrootd::Unlink().

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

## Rm() [2/2]

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

Definition at line 1369 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Rm( path, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::Rm
RmImpl< false > Rm
Definition XrdClFileSystemOperations.hh:378

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

Here is the call graph for this function:

## RmDir() [1/2]

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

Definition at line 1429 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->RmDir( path, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientRmdirRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_rmdir;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientRmdirRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:710
kXR_rmdir
@ kXR_rmdir
Definition XProtocol.hh:127
ClientRmdirRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:708

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientRmdirRequest::dlen, kXR_rmdir, XrdCl::MessageUtils::ProcessSendParams(), ClientRmdirRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoRmDir(), and XrdPosixXrootd::Rmdir().

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

## RmDir() [2/2]

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

Definition at line 1455 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = RmDir( path, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::RmDir
RmDirImpl< false > RmDir
Definition XrdClFileSystemOperations.hh:473

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

Here is the call graph for this function:

## SendCache() [1/2]

XRootDStatus XrdCl::FileSystem::SendCache | ( | const std::string & | info,
|  | Buffer *& | response,
|  | uint16_t | timeout = 0 )

Send cache info to the server - sync.

Send cache into the server - 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

Definition at line 1911 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = SendCache( info, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::FileSystem::SendCache
XRootDStatus SendCache(const std::string &info, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition XrdClFileSystem.cc:1897

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

Here is the call graph for this function:

## SendCache() [2/2]

XRootDStatus XrdCl::FileSystem::SendCache | ( | const std::string & | info,
|  | ResponseHandler * | handler,
|  | uint16_t | timeout = 0 )

Send cache into the server - 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

Definition at line 1897 of file XrdClFileSystem.cc.

{
// Note: adding SendCache() to the FileSystemPlugin class breaks ABI!
// So, the class is missing this until we do a major release. TODO
//if( pPlugIn )
// return pPlugIn->SendCache( info, handler, timeout );
return SendSet("cache ", info, handler, timeout );
}

Referenced by DoCache(), and SendCache().

Here is the caller graph for this function:

## SendInfo() [1/2]

XRootDStatus XrdCl::FileSystem::SendInfo | ( | const std::string & | info,
|  | Buffer *& | response,
|  | uint16_t | timeout = 0 )

Send info to the server - sync.

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

Definition at line 1938 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = SendInfo( info, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::SendInfo
SendInfoImpl< false > SendInfo
Definition XrdClFileSystemOperations.hh:793

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

Here is the call graph for this function:

## SendInfo() [2/2]

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

Definition at line 1926 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->SendInfo( info, handler, timeout );
return SendSet("monitor info ", info, handler, timeout );
}

## SetProperty()

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

Set filesystem property

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

Definition at line 2175 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->SetProperty( name, value );
if( name == "FollowRedirects" )
{
if( value == "true" ) pImpl->fsdata->pFollowRedirects = true;
else pImpl->fsdata->pFollowRedirects = false;
return true;
}
return false;
}

References XrdCl::NullRef< Response >::value.

## SetXAttr() [1/2]

XRootDStatus XrdCl::FileSystem::SetXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2035 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return XRootDStatus( stError, errNotSupported );
return XAttrOperationImpl( kXR_fattrSet, 0, path, attrs, handler, timeout );
}
kXR_fattrSet
@ kXR_fattrSet
Definition XProtocol.hh:273

References XrdCl::errNotSupported, kXR_fattrSet, and XrdCl::stError.

Referenced by DoXAttr(), and SetXAttr().

Here is the caller graph for this function:

## SetXAttr() [2/2]

XRootDStatus XrdCl::FileSystem::SetXAttr | ( | const std::string & | path,
|  | 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

Definition at line 2049 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
XRootDStatus st = SetXAttr( path, attrs, &handler, timeout );
if( !st.IsOK() )
return st;
std::vector<XAttrStatus> *resp = 0;
st = MessageUtils::WaitForResponse( &handler, resp );
if( resp ) result.swap( *resp );
delete resp;
return st;
}
XrdCl::FileSystem::SetXAttr
XRootDStatus SetXAttr(const std::string &path, const std::vector< xattr_t > &attrs, ResponseHandler *handler, uint16_t timeout=0)
Definition XrdClFileSystem.cc:2035

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

Here is the call graph for this function:

## Stat() [1/2]

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

Definition at line 1546 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Stat( path, handler, timeout );
if( pImpl->fsdata->pUrl->IsLocalFile() )
return LocalFS::Instance().Stat( path, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientStatRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_stat;
req->options = 0;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
kXR_stat
@ kXR_stat
Definition XProtocol.hh:129
ClientStatRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:768
ClientStatRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:772
ClientStatRequest::options
kXR_char options
Definition XProtocol.hh:769

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientStatRequest::dlen, kXR_stat, ClientStatRequest::options, XrdCl::MessageUtils::ProcessSendParams(), ClientStatRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoCD(), and DoLS().

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

## Stat() [2/2]

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

Definition at line 1576 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Stat( path, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}

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

Here is the call graph for this function:

## StatVFS() [1/2]

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

Definition at line 1591 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->StatVFS( path, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientStatRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_stat;
req->options = kXR_vfs;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
kXR_vfs
@ kXR_vfs
Definition XProtocol.hh:763

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientStatRequest::dlen, kXR_stat, kXR_vfs, ClientStatRequest::options, XrdCl::MessageUtils::ProcessSendParams(), ClientStatRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoStatVFS(), and XrdPosixXrootd::Statvfs().

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

## StatVFS() [2/2]

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

Definition at line 1618 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = StatVFS( path, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForResponse( &handler, response );
}
XrdCl::StatVFS
StatVFSImpl< false > StatVFS
Definition XrdClFileSystemOperations.hh:658

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

Here is the call graph for this function:

## Truncate() [1/2]

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

Definition at line 1297 of file XrdClFileSystem.cc.

{
if( pPlugIn )
return pPlugIn->Truncate( path, size, handler, timeout );
std::string fPath = FilterXrdClCgi( path );
Message *msg;
ClientTruncateRequest *req;
MessageUtils::CreateRequest( msg, req, fPath.length() );
req->requestid = kXR_truncate;
req->offset = size;
req->dlen = fPath.length();
msg->Append( fPath.c_str(), fPath.length(), 24 );
MessageSendParams params; params.timeout = timeout;
MessageUtils::ProcessSendParams( params );
XRootDTransport::SetDescription( msg );
return FileSystemData::Send( pImpl->fsdata, msg, handler, params );
}
ClientTruncateRequest::requestid
kXR_unt16 requestid
Definition XProtocol.hh:793
kXR_truncate
@ kXR_truncate
Definition XProtocol.hh:140
ClientTruncateRequest::offset
kXR_int64 offset
Definition XProtocol.hh:795
ClientTruncateRequest::dlen
kXR_int32 dlen
Definition XProtocol.hh:797

References XrdCl::Buffer::Append(), XrdCl::MessageUtils::CreateRequest(), ClientTruncateRequest::dlen, kXR_truncate, ClientTruncateRequest::offset, XrdCl::MessageUtils::ProcessSendParams(), ClientTruncateRequest::requestid, XrdCl::FileSystemData::Send(), XrdCl::XRootDTransport::SetDescription(), and XrdCl::MessageSendParams::timeout.

Referenced by DoTruncate(), Truncate(), and XrdPosixXrootd::Truncate().

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

## Truncate() [2/2]

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

Definition at line 1325 of file XrdClFileSystem.cc.

{
SyncResponseHandler handler;
Status st = Truncate( path, size, &handler, timeout );
if( !st.IsOK() )
return st;
return MessageUtils::WaitForStatus( &handler );
}
XrdCl::FileSystem::Truncate
XRootDStatus Truncate(const std::string &path, uint64_t size, ResponseHandler *handler, uint16_t timeout=0) XRD_WARN_UNUSED_RESULT
Definition XrdClFileSystem.cc:1297

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

Here is the call graph for this function:

## Friends And Related Symbol Documentation

## AssignLBHandler

friend class AssignLBHandler

friend

Definition at line 204 of file XrdClFileSystem.hh.

References AssignLBHandler.

Referenced by AssignLBHandler.

## ForkHandler

friend class ForkHandler

friend

Definition at line 205 of file XrdClFileSystem.hh.

References ForkHandler.

Referenced by ForkHandler.

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

- XrdClFileSystem.hh
- XrdClFileSystem.cc