28#include <XrdCl/XrdClFileSystem.hh>
29#include <XrdCl/XrdClXRootDResponses.hh>
30#include <XrdVersion.hh>
31#if XrdVNUMBER >= 40000
32#include <XrdNet/XrdNetAddr.hh>
34#include <XrdSys/XrdSysDNS.hh>
53 struct DirectoryInfo {
55 XrdCl::DirectoryList *fDirList;
56 XrdCl::DirectoryList::Iterator *fDirListIter;
59 DirectoryInfo(
const char *
dir) : fUrl(
new XrdCl::URL(
dir)), fDirList(0), fDirListIter(0) {}
74 TSystem(
"-root",
"Net file Helper System"), fUrl(0), fFileSystem(0)
88 TSystem(
"-root",
"Net file Helper System")
90 using namespace XrdCl;
94 fUrl =
new URL(std::string(
url));
116 using namespace XrdCl;
118 DirectoryInfo *
dirInfo =
new DirectoryInfo(
dir);
131 using namespace XrdCl;
136 Error(
"MakeDirectory",
"%s",
st.GetErrorMessage().c_str());
151 delete (DirectoryInfo *)
dirp;
162 using namespace XrdCl;
167 DirListFlags::Locate,
170 Error(
"GetDirEntry",
"%s",
st.GetErrorMessage().c_str());
173 dirInfo->fDirListIter =
new DirectoryList::Iterator(
dirInfo->fDirList->Begin());
195 using namespace XrdCl;
203 Info(
"GetPathInfo",
"Stat error: %s",
st.GetErrorMessage().c_str());
211 if (
info->TestFlags(StatInfo::Offline)) {
214 std::stringstream
sstr(
info->GetId());
218 buf.
fDev = (
id >> 32);
219 buf.
fIno = (
id & 0x00000000FFFFFFFF);
226 if (
info->TestFlags(StatInfo::XBitSet))
249 using namespace XrdCl;
256 Info(
"ConsistentWith",
"Protocol: '%s' (%s), Username: '%s' (%s), "
257 "Password: '%s' (%s), Hostname: '%s' (%s), Port: %d (%d)",
258 fUrl->GetProtocol().c_str(),
url.GetProtocol().c_str(),
259 fUrl->GetUserName().c_str(),
url.GetUserName().c_str(),
260 fUrl->GetPassword().c_str(),
url.GetPassword().c_str(),
261 fUrl->GetHostName().c_str(),
url.GetHostName().c_str(),
262 fUrl->GetPort(),
url.GetPort());
265 if(
fUrl->GetProtocol() ==
url.GetProtocol() &&
266 fUrl->GetUserName() ==
url.GetUserName() &&
267 fUrl->GetPassword() ==
url.GetPassword() &&
268 fUrl->GetHostName() ==
url.GetHostName() &&
269 fUrl->GetPort() ==
url.GetPort())
287 using namespace XrdCl;
294 Error(
"Unlink",
"%s",
st.GetErrorMessage().c_str());
298 if (
info->TestFlags(StatInfo::IsDir))
305 Error(
"Unlink",
"%s",
st.GetErrorMessage().c_str());
333 using namespace XrdCl;
341 Error(
"Locate",
"%s",
st.GetErrorMessage().c_str());
360#if XrdVNUMBER >= 40000
370 char *
addr[1] = {0}, *
name[1] = {0};
382 Info(
"Locate",
"caching host name: %s",
hn->GetTitle());
418 using namespace XrdCl;
427 Warning(
"Stage",
"object is of unexpected type %s - ignoring",
432 fileList.push_back(std::string(URL(path.
Data()).GetPath()));
439 Error(
"Stage",
"%s",
st.GetErrorMessage().c_str());
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
TSystem * ROOT_Plugin_TNetXNGSystem(const char *url, Bool_t owner)
PluginManager creation function.
#define R__LOCKGUARD(mutex)
Collection abstract base class.
static TString GetPathName(TObject *o)
Return the path name contained in object 'o' allowing for TUrl, TObjString or TFileInfo.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
Bool_t ConsistentWith(const char *path, void *dirptr) override
Check consistency of this helper with the one required by 'path' or 'dirptr'.
int Unlink(const char *path) override
Unlink a file on the remote server.
XrdCl::FileSystem * fFileSystem
static TMutex fgAddrMutex
void * OpenDirectory(const char *dir) override
Open a directory.
std::set< void * > fDirPtrs
static THashList fgAddrFQDN
Int_t GetPathInfo(const char *path, FileStat_t &buf) override
Get info about a file (stat)
const char * GetDirEntry(void *dirp) override
Get a directory entry.
virtual Int_t Stage(const char *path, UChar_t priority)
Issue a stage request for a single file.
virtual Int_t Locate(const char *path, TString &endurl)
Get the endpoint URL of a file.
void FreeDirectory(void *dirp) override
Free a directory.
TNetXNGSystem(Bool_t owner=kTRUE)
Constructor: Create system class without connecting to server.
virtual ~TNetXNGSystem()
Destructor.
Bool_t IsPathLocal(const char *path) override
Is this path a local path?
Int_t MakeDirectory(const char *dir) override
Create a directory.
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
const char * Data() const
Abstract base class defining a generic interface to the underlying Operating System.
virtual Bool_t IsPathLocal(const char *path)
Returns TRUE if the url in 'path' points to the local file system.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void SetHost(const char *host)