Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RSysFile.cxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9/// \file
10/// \author Sergey Linev <S.Linev@gsi.de>
11/// \date 2019-10-15
12
13
15
20
21#include "ROOT/RLogger.hxx"
22
23#include "TROOT.h"
24#include "TList.h"
25#include "TBase64.h"
26#include "snprintf.h"
27
28#include <sstream>
29#include <fstream>
30#include <algorithm>
31
32#ifdef _MSC_VER
33#include <windows.h>
34#include <tchar.h>
35#endif
36
37using namespace std::string_literals;
38
39using namespace ROOT::Browsable;
40
41namespace ROOT {
42namespace Browsable {
43
44
45#ifdef _MSC_VER
46bool IsWindowsLink(const std::string &path)
47{
48 return (path.length() > 4) && (path.rfind(".lnk") == path.length() - 4);
49}
50#endif
51
52
53/** \class RSysDirLevelIter
54\ingroup rbrowser
55
56Iterator over files in in sub-directory
57*/
58
59
61 std::string fPath; ///<! fully qualified path without final slash
62 void *fDir{nullptr}; ///<! current directory handle
63 std::string fCurrentName; ///<! current file name
64 std::string fItemName; ///<! current item name
65 FileStat_t fCurrentStat; ///<! stat for current file name
66
67 /** Open directory for listing */
68 bool OpenDir()
69 {
70 if (fDir)
71 CloseDir();
72
73#ifdef _MSC_VER
74 // on Windows path can be redirected via .lnk therefore get real path name before OpenDirectory,
75 // otherwise such realname will not be known for us
76 if (IsWindowsLink(fPath)) {
77 char *realWinPath = gSystem->ExpandPathName(fPath.c_str());
79 delete [] realWinPath;
80 }
81#endif
82
83 fDir = gSystem->OpenDirectory(fPath.c_str());
84
85#ifdef _MSC_VER
86 // Directory can be an soft link (not as .lnk) and should be tried as well
87 if (!fDir) {
88
89 auto hFile = CreateFile(fPath.c_str(), // file to open
90 0, // open for reading
91 0, // share for reading
92 0, // default security
93 OPEN_EXISTING, // existing file only
94 FILE_FLAG_BACKUP_SEMANTICS, // flag to work with dirs
95 NULL); // no attr. template
96
98 const int BUFSIZE = 2048;
99 TCHAR path[BUFSIZE];
101 // produced file name may include \\? symbols, which are indicating long file name
102 if ((dwRet > 0) && (dwRet < BUFSIZE))
103 if ((path[0] == '\\') && (path[1] == '\\') && (path[2] == '?') && (path[3] == '\\')) {
104 R__LOG_DEBUG(0, BrowsableLog()) << "Try to open directory " << (path+4) << " instead of " << fPath;
105 fDir = gSystem->OpenDirectory(path + 4);
106 if (fDir) fPath = path + 4;
107 }
108 }
109
111 }
112
113#endif
114
115 if (!fDir) {
116 R__LOG_ERROR(BrowsableLog()) << "Fail to open directory " << fPath;
117 return false;
118 }
119
120 return true;
121 }
122
123 /** Close directory for listing */
124 void CloseDir()
125 {
126 if (fDir)
128 fDir = nullptr;
129 fCurrentName.clear();
130 fItemName.clear();
131 }
132
133 /** Return full dir name with appropriate slash at the end */
134 std::string FullDirName() const
135 {
136 std::string path = fPath;
137#ifdef _MSC_VER
138 const char *slash = "\\";
139#else
140 const char *slash = "/";
141#endif
142 if (path.rfind(slash) != path.length() - 1)
143 path.append(slash);
144 return path;
145 }
146
147 /** Check if entry of that name exists */
148 bool TestDirEntry(const std::string &name)
149 {
150 auto testname = name;
151
152 auto path = FullDirName() + testname;
153
154 auto pathinfores = gSystem->GetPathInfo(path.c_str(), fCurrentStat);
155
156#ifdef _MSC_VER
157 if (pathinfores && !IsWindowsLink(path)) {
158 std::string lpath = path + ".lnk";
160 if (!pathinfores) testname.append(".lnk");
161 }
162#endif
163
164 if (pathinfores) {
165
166 if (fCurrentStat.fIsLink) {
167 R__LOG_DEBUG(0, BrowsableLog()) << "Broken symlink of " << path;
168 } else {
169 R__LOG_DEBUG(0, BrowsableLog()) << "Can't read file attributes of \"" << path << "\" err:" << gSystem->GetError();
170 }
171 return false;
172 }
173
175#ifdef _MSC_VER
177 fItemName.resize(fItemName.length() - 4);
178#endif
179 return true;
180 }
181
182 /** Trying to produce next entry */
184 {
185 fCurrentName.clear();
186 fItemName.clear();
187
188 if (!fDir)
189 return false;
190
191 while (fCurrentName.empty()) {
192
193 // one have to use const char* to correctly check for nullptr
194 const char *name = gSystem->GetDirEntry(fDir);
195
196 if (!name) {
197 CloseDir();
198 return false;
199 }
200
201 std::string sname = name;
202
203 if ((sname == ".") || (sname == ".."))
204 continue;
205
207 }
208
209
210 return true;
211 }
212
213 std::string GetFileExtension(const std::string &fname) const
214 {
215 auto pos = fname.rfind(".");
216 if ((pos != std::string::npos) && (pos < fname.length() - 1) && (pos > 0))
217 return fname.substr(pos+1);
218
219 return ""s;
220 }
221
222public:
223 explicit RSysDirLevelIter(const std::string &path = "") : fPath(path) { OpenDir(); }
224
225 ~RSysDirLevelIter() override { CloseDir(); }
226
227 bool Next() override { return NextDirEntry(); }
228
229 bool Find(const std::string &name, int = -1) override
230 {
231 // ignore index, it is not possible to have duplicated file names
232
233 if (!fDir && !OpenDir())
234 return false;
235
236 return TestDirEntry(name);
237 }
238
239 std::string GetItemName() const override { return fItemName; }
240
241 /** Returns true if directory or is file format supported */
242 bool CanItemHaveChilds() const override
243 {
245 return true;
246
248 return true;
249
250 return false;
251 }
252
253 std::unique_ptr<RItem> CreateItem() override
254 {
255 auto item = std::make_unique<RSysFileItem>(GetItemName(), CanItemHaveChilds() ? -1 : 0);
256
257 // this is construction of current item
258 char tmp[256];
259
260 item->type = fCurrentStat.fMode;
261 item->size = fCurrentStat.fSize;
262 item->uid = fCurrentStat.fUid;
263 item->gid = fCurrentStat.fGid;
264 item->modtime = fCurrentStat.fMtime;
265 item->islink = fCurrentStat.fIsLink;
266 item->isdir = R_ISDIR(fCurrentStat.fMode);
267
268 if (item->isdir)
269 item->SetIcon("sap-icon://folder-blank"s);
270 else
272
273 // set file size as string
274 item->SetSize(item->size);
275
276 // modification time
277 time_t loctime = (time_t) item->modtime;
278 struct tm *newtime = localtime(&loctime);
279 if (newtime) {
280 snprintf(tmp, sizeof(tmp), "%d-%02d-%02d %02d:%02d", newtime->tm_year + 1900,
281 newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour,
282 newtime->tm_min);
283 item->SetMTime(tmp);
284 } else {
285 item->SetMTime("1901-01-01 00:00");
286 }
287
288 // file type
289 snprintf(tmp, sizeof(tmp), "%c%c%c%c%c%c%c%c%c%c",
290 (item->islink ?
291 'l' :
292 R_ISREG(item->type) ?
293 '-' :
294 (R_ISDIR(item->type) ?
295 'd' :
296 (R_ISCHR(item->type) ?
297 'c' :
298 (R_ISBLK(item->type) ?
299 'b' :
300 (R_ISFIFO(item->type) ?
301 'p' :
302 (R_ISSOCK(item->type) ?
303 's' : '?' )))))),
304 ((item->type & kS_IRUSR) ? 'r' : '-'),
305 ((item->type & kS_IWUSR) ? 'w' : '-'),
306 ((item->type & kS_ISUID) ? 's' : ((item->type & kS_IXUSR) ? 'x' : '-')),
307 ((item->type & kS_IRGRP) ? 'r' : '-'),
308 ((item->type & kS_IWGRP) ? 'w' : '-'),
309 ((item->type & kS_ISGID) ? 's' : ((item->type & kS_IXGRP) ? 'x' : '-')),
310 ((item->type & kS_IROTH) ? 'r' : '-'),
311 ((item->type & kS_IWOTH) ? 'w' : '-'),
312 ((item->type & kS_ISVTX) ? 't' : ((item->type & kS_IXOTH) ? 'x' : '-')));
313 item->SetType(tmp);
314
316 if (user_group) {
317 item->SetUid(user_group->fUser.Data());
318 item->SetGid(user_group->fGroup.Data());
319 delete user_group;
320 } else {
321 item->SetUid(std::to_string(item->uid));
322 item->SetGid(std::to_string(item->gid));
323 }
324
325 return item;
326 }
327
328 /** Returns full information for current element */
329 std::shared_ptr<RElement> GetElement() override
330 {
331 if (!R_ISDIR(fCurrentStat.fMode)) {
333
336 if (elem) return elem;
337 }
338 }
339
340 return std::make_shared<RSysFile>(fCurrentStat, FullDirName(), fCurrentName);
341 }
342
343};
344
345
346} // namespace Browsable
347} // namespace ROOT
348
349
350/////////////////////////////////////////////////////////////////////////////////
351/// Get icon for the type of given file name
352
353std::string RSysFile::GetFileIcon(const std::string &fname)
354{
355 std::string name = fname;
356 std::transform(name.begin(), name.end(), name.begin(), ::tolower);
357
358 auto EndsWith = [name](const std::string &suffix) {
359 return (name.length() > suffix.length()) ? (0 == name.compare (name.length() - suffix.length(), suffix.length(), suffix)) : false;
360 };
361
362 if (EndsWith(".c") || EndsWith(".cpp") || EndsWith(".cxx") || EndsWith(".c++") || EndsWith(".cxx") ||
363 EndsWith(".cc") || EndsWith(".h") || EndsWith(".hh") || EndsWith(".hpp") || EndsWith(".hxx") ||
364 EndsWith(".h++") || EndsWith(".py") || EndsWith(".txt") || EndsWith(".cmake") || EndsWith(".dat") ||
365 EndsWith(".log") || EndsWith(".xml") || EndsWith(".htm") || EndsWith(".html") || EndsWith(".json") ||
366 EndsWith(".sh") || EndsWith(".md") || EndsWith(".css") || EndsWith(".mjs") || EndsWith(".js"))
367 return "sap-icon://document-text"s;
368 if (EndsWith(".bmp") || EndsWith(".gif") || EndsWith(".jpeg") || EndsWith(".jpg") || EndsWith(".png") ||
369 EndsWith(".webp") || EndsWith(".svg"))
370 return "sap-icon://picture"s;
371 if (EndsWith(".root"))
372 return "sap-icon://org-chart"s;
373
374 return "sap-icon://document"s;
375}
376
377
378/////////////////////////////////////////////////////////////////////////////////
379/// Create file element
380
381RSysFile::RSysFile(const std::string &filename) : fFileName(filename)
382{
383 if (gSystem->GetPathInfo(fFileName.c_str(), fStat)) {
384 if (fStat.fIsLink) {
385 R__LOG_DEBUG(0, BrowsableLog()) << "Broken symlink of " << fFileName;
386 } else {
387 R__LOG_DEBUG(0, BrowsableLog()) << "Can't read file attributes of \"" << fFileName
388 << "\" err:" << gSystem->GetError();
389 }
390 }
391
392 auto pos = fFileName.find_last_of("\\/");
393 if ((pos != std::string::npos) && (pos < fFileName.length() - 1)) {
394 fDirName = fFileName.substr(0, pos+1);
395 fFileName.erase(0, pos+1);
396 }
397}
398
399/////////////////////////////////////////////////////////////////////////////////
400/// Create file element with already provided stats information
401
402RSysFile::RSysFile(const FileStat_t &stat, const std::string &dirname, const std::string &filename)
403 : fStat(stat), fDirName(dirname), fFileName(filename)
404{
405}
406
407/////////////////////////////////////////////////////////////////////////////////
408/// return file name
409
410std::string RSysFile::GetName() const
411{
412 return fFileName;
413}
414
415/////////////////////////////////////////////////////////////////////////////////
416/// Check if file name the same, ignore case on Windows
417
418bool RSysFile::MatchName(const std::string &name) const
419{
420 auto ownname = GetName();
421
422#ifdef _MSC_VER
423
424 return std::equal(name.begin(), name.end(),
426 [](char a, char b) {
427 return tolower(a) == tolower(b);
428 });
429#else
430
431 return ownname == name;
432
433#endif
434}
435
436/////////////////////////////////////////////////////////////////////////////////
437/// Get default action for the file
438/// Either start text editor or image viewer or just do file browsing
439
441{
442 if (R_ISDIR(fStat.fMode)) return kActBrowse;
443
444 auto icon = GetFileIcon(GetName());
445 if (icon == "sap-icon://document-text"s) return kActEdit;
446 if (icon == "sap-icon://picture"s) return kActImage;
447 if (icon == "sap-icon://org-chart"s) return kActBrowse;
448 return kActNone;
449}
450
451/////////////////////////////////////////////////////////////////////////////////
452/// Returns full file name - including fully qualified path
453
454std::string RSysFile::GetFullName() const
455{
456 return fDirName + fFileName;
457}
458
459/////////////////////////////////////////////////////////////////////////////////
460/// Returns iterator for files in directory
461
462std::unique_ptr<RLevelIter> RSysFile::GetChildsIter()
463{
464 if (!R_ISDIR(fStat.fMode))
465 return nullptr;
466
467 return std::make_unique<RSysDirLevelIter>(GetFullName());
468}
469
470/////////////////////////////////////////////////////////////////////////////////
471/// Returns file content of requested kind
472
473std::string RSysFile::GetContent(const std::string &kind)
474{
475 if ((GetContentKind(kind) == kText) && (GetFileIcon(GetName()) == "sap-icon://document-text"s)) {
476 std::ifstream t(GetFullName());
477 return std::string(std::istreambuf_iterator<char>(t), std::istreambuf_iterator<char>());
478 }
479
480 if ((GetContentKind(kind) == kImage) && (GetFileIcon(GetName()) == "sap-icon://picture"s)) {
481 std::ifstream t(GetFullName(), std::ios::binary);
482 std::string content = std::string(std::istreambuf_iterator<char>(t), std::istreambuf_iterator<char>());
483
484 auto encode = TBase64::Encode(content.data(), content.length());
485
486 auto pos = GetName().rfind(".");
487
488 std::string image_kind = GetName().substr(pos+1);
489 std::transform(image_kind.begin(), image_kind.end(), image_kind.begin(), ::tolower);
490 if (image_kind == "svg") image_kind = "svg+xml";
491
492 return "data:image/"s + image_kind + ";base64,"s + encode.Data();
493 }
494
495 if (GetContentKind(kind) == kFileName) {
496 return GetFullName();
497 }
498
499 return ""s;
500}
501
502
503/////////////////////////////////////////////////////////////////////////////////
504/// Provide top entries for file system
505/// On windows it is list of existing drivers, on Linux it is "File system" and "Home"
506
507RElementPath_t RSysFile::ProvideTopEntries(std::shared_ptr<RGroup> &comp, const std::string &workdir)
508{
509 std::string seldir = workdir;
510
511 if (seldir.empty())
513
514 seldir = gSystem->UnixPathName(seldir.c_str());
515
516 auto volumes = gSystem->GetVolumes("all");
517 if (volumes) {
518 // this is Windows
519 TIter iter(volumes);
520 TObject *obj;
521 while ((obj = iter()) != nullptr) {
522 std::string name = obj->GetName();
523 std::string dir = name + "\\"s;
524 comp->Add(std::make_shared<Browsable::RWrapper>(name, std::make_unique<RSysFile>(dir)));
525 }
526 delete volumes;
527
528 } else {
529 comp->Add(std::make_shared<Browsable::RWrapper>("File system", std::make_unique<RSysFile>("/")));
530
531 seldir = "/File system"s + seldir;
532
534
535 if (!homedir.empty())
536 comp->Add(std::make_shared<Browsable::RWrapper>("Home", std::make_unique<RSysFile>(homedir)));
537 }
538
540}
541
542/////////////////////////////////////////////////////////////////////////////////
543/// Return working path in browser hierarchy
544
546{
547 std::string seldir = workdir;
548
549 if (seldir.empty())
551
552 seldir = gSystem->UnixPathName(seldir.c_str());
553
554 auto volumes = gSystem->GetVolumes("all");
555 if (volumes) {
556 delete volumes;
557 } else {
558 seldir = "/File system"s + seldir;
559 }
560
562}
563
#define R__LOG_ERROR(...)
Definition RLogger.hxx:356
#define R__LOG_DEBUG(DEBUGLEVEL,...)
Definition RLogger.hxx:359
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
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
char name[80]
Definition TGX11.cxx:148
#define INVALID_HANDLE_VALUE
Definition TMapFile.cxx:84
Bool_t R_ISFIFO(Int_t mode)
Definition TSystem.h:128
Bool_t R_ISSOCK(Int_t mode)
Definition TSystem.h:129
Bool_t R_ISBLK(Int_t mode)
Definition TSystem.h:125
Bool_t R_ISREG(Int_t mode)
Definition TSystem.h:126
Bool_t R_ISDIR(Int_t mode)
Definition TSystem.h:123
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
Bool_t R_ISCHR(Int_t mode)
Definition TSystem.h:124
@ kS_IRGRP
Definition TSystem.h:114
@ kS_IWUSR
Definition TSystem.h:111
@ kS_ISUID
Definition TSystem.h:106
@ kS_IRUSR
Definition TSystem.h:110
@ kS_IXOTH
Definition TSystem.h:120
@ kS_ISGID
Definition TSystem.h:107
@ kS_IROTH
Definition TSystem.h:118
@ kS_IWGRP
Definition TSystem.h:115
@ kS_IXUSR
Definition TSystem.h:112
@ kS_ISVTX
Definition TSystem.h:108
@ kS_IWOTH
Definition TSystem.h:119
@ kS_IXGRP
Definition TSystem.h:116
#define BUFSIZE
const char * extension
Definition civetweb.c:8515
#define snprintf
Definition civetweb.c:1579
static EContentKind GetContentKind(const std::string &kind)
Find item with specified name Default implementation, should work for all.
Definition RElement.cxx:54
@ kFileName
"filename" - file name if applicable
Definition RElement.hxx:43
@ kText
"text" - plain text for code editor
Definition RElement.hxx:38
@ kImage
"image64" - base64 for supported image formats (png/gif/gpeg)
Definition RElement.hxx:39
EActionKind
Possible actions on double-click.
Definition RElement.hxx:49
@ kActImage
can be shown in image viewer, can provide image
Definition RElement.hxx:53
@ kActBrowse
just browse (expand) item
Definition RElement.hxx:51
@ kActEdit
can provide data for text editor
Definition RElement.hxx:52
static RElementPath_t ParsePath(const std::string &str)
Parse string path to produce RElementPath_t One should avoid to use string pathes as much as possible...
Definition RElement.cxx:118
Iterator over single level hierarchy like any array, keys list, ...
static bool IsFileFormatSupported(const std::string &extension)
static std::shared_ptr< RElement > OpenFile(const std::string &extension, const std::string &fullname)
Iterator over files in in sub-directory.
Definition RSysFile.cxx:60
void * fDir
! current directory handle
Definition RSysFile.cxx:62
FileStat_t fCurrentStat
! stat for current file name
Definition RSysFile.cxx:65
bool Find(const std::string &name, int=-1) override
Find item with specified name Default implementation, should work for all If index specified,...
Definition RSysFile.cxx:229
std::string fItemName
! current item name
Definition RSysFile.cxx:64
void CloseDir()
Close directory for listing.
Definition RSysFile.cxx:124
std::string GetFileExtension(const std::string &fname) const
Definition RSysFile.cxx:213
std::string FullDirName() const
Return full dir name with appropriate slash at the end.
Definition RSysFile.cxx:134
std::shared_ptr< RElement > GetElement() override
Returns full information for current element.
Definition RSysFile.cxx:329
bool TestDirEntry(const std::string &name)
Check if entry of that name exists.
Definition RSysFile.cxx:148
std::string fCurrentName
! current file name
Definition RSysFile.cxx:63
RSysDirLevelIter(const std::string &path="")
Definition RSysFile.cxx:223
std::string fPath
! fully qualified path without final slash
Definition RSysFile.cxx:61
std::unique_ptr< RItem > CreateItem() override
Create generic description item for RBrowser.
Definition RSysFile.cxx:253
bool OpenDir()
Open directory for listing.
Definition RSysFile.cxx:68
bool NextDirEntry()
Trying to produce next entry.
Definition RSysFile.cxx:183
bool Next() override
Shift to next entry.
Definition RSysFile.cxx:227
bool CanItemHaveChilds() const override
Returns true if directory or is file format supported.
Definition RSysFile.cxx:242
std::string GetItemName() const override
Returns current entry name
Definition RSysFile.cxx:239
std::string GetFullName() const
Returns full file name - including fully qualified path.
Definition RSysFile.cxx:454
std::unique_ptr< RLevelIter > GetChildsIter() override
Returns iterator for files in directory.
Definition RSysFile.cxx:462
std::string fDirName
! fully-qualified directory name
Definition RSysFile.hxx:32
FileStat_t fStat
! file stat object
Definition RSysFile.hxx:31
RSysFile(const std::string &filename)
Create file element.
Definition RSysFile.cxx:381
std::string GetName() const override
Name of RElement - file name in this case.
Definition RSysFile.cxx:410
static std::string GetFileIcon(const std::string &fname)
Get icon for the type of given file name.
Definition RSysFile.cxx:353
EActionKind GetDefaultAction() const override
Get default action for the file Either start text editor or image viewer or just do file browsing.
Definition RSysFile.cxx:440
std::string GetContent(const std::string &kind) override
Returns file content of requested kind.
Definition RSysFile.cxx:473
static RElementPath_t ProvideTopEntries(std::shared_ptr< RGroup > &comp, const std::string &workdir="")
Provide top entries for file system On windows it is list of existing drivers, on Linux it is "File s...
Definition RSysFile.cxx:507
bool MatchName(const std::string &name) const override
Checks if element name match to provided value.
Definition RSysFile.cxx:418
std::string fFileName
! file name in current dir
Definition RSysFile.hxx:33
static RElementPath_t GetWorkingPath(const std::string &workdir="")
Return working path in browser hierarchy.
Definition RSysFile.cxx:545
const_iterator begin() const
const_iterator end() const
static TString Encode(const char *data)
Transform data into a null terminated base64 string.
Definition TBase64.cxx:106
Mother of all ROOT objects.
Definition TObject.h:42
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:462
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Definition TSystem.cxx:1289
virtual void FreeDirectory(void *dirp)
Free a directory.
Definition TSystem.cxx:859
virtual void * OpenDirectory(const char *name)
Open a directory.
Definition TSystem.cxx:850
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Definition TSystem.cxx:1413
virtual TList * GetVolumes(Option_t *) const
Definition TSystem.h:475
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Definition TSystem.cxx:867
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition TSystem.cxx:1077
virtual const char * WorkingDirectory()
Return working directory.
Definition TSystem.cxx:885
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
Definition TSystem.cxx:901
virtual const char * GetError()
Return system error string.
Definition TSystem.cxx:253
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition TSystem.cxx:1616
std::vector< std::string > RElementPath_t
Definition RElement.hxx:20
bool EndsWith(std::string_view string, std::string_view suffix)
ROOT::RLogChannel & BrowsableLog()
Log channel for Browsable diagnostics.
Definition RElement.cxx:22
TCanvas * slash()
Definition slash.C:1
Int_t fMode
Definition TSystem.h:135
Long64_t fSize
Definition TSystem.h:138
Int_t fGid
Definition TSystem.h:137
Long_t fMtime
Definition TSystem.h:139
Bool_t fIsLink
Definition TSystem.h:140
Int_t fUid
Definition TSystem.h:136