Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RSysFile.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2020, 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#ifndef ROOT7_Browsable_RSysFile
10#define ROOT7_Browsable_RSysFile
11
14
15#include "TSystem.h"
16#include <string>
17
18namespace ROOT {
19namespace Browsable {
20
21class RSysDirLevelIter;
22
23/** \class RSysFile
24\ingroup rbrowser
25*/
26
27class RSysFile : public RElement {
28
29 friend class RSysDirLevelIter;
30
31 FileStat_t fStat; ///<! file stat object
32 std::string fDirName; ///<! fully-qualified directory name
33 std::string fFileName; ///<! file name in current dir
34
35 std::string GetFullName() const;
36
37public:
38 RSysFile(const std::string &filename);
39
40 RSysFile(const FileStat_t& stat, const std::string &dirname, const std::string &filename);
41
42 virtual ~RSysFile() = default;
43
44 /** Name of RElement - file name in this case */
45 std::string GetName() const override;
46
47 /** Checks if element name match to provided value */
48 bool MatchName(const std::string &name) const override;
49
50 /** Title of RElement - full file name */
51 std::string GetTitle() const override { return GetFullName(); }
52
53 std::unique_ptr<RLevelIter> GetChildsIter() override;
54
55 std::string GetContent(const std::string &kind) override;
56
57 EActionKind GetDefaultAction() const override;
58
59 static std::string GetFileIcon(const std::string &fname);
60
61 static RElementPath_t ProvideTopEntries(std::shared_ptr<RGroup> &comp, const std::string &workdir = "");
62
63 static RElementPath_t GetWorkingPath(const std::string &workdir = "");
64
65};
66
67} // namespace Browsable
68} // namespace ROOT
69
70
71#endif
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:110
Basic element of browsable hierarchy.
Definition RElement.hxx:34
EActionKind
Possible actions on double-click.
Definition RElement.hxx:50
Iterator over files in in sub-directory.
Definition RSysFile.cxx:63
std::string GetFullName() const
Returns full file name - including fully qualified path.
Definition RSysFile.cxx:480
std::unique_ptr< RLevelIter > GetChildsIter() override
Returns iterator for files in directory.
Definition RSysFile.cxx:488
std::string fDirName
! fully-qualified directory name
Definition RSysFile.hxx:32
virtual ~RSysFile()=default
FileStat_t fStat
! file stat object
Definition RSysFile.hxx:31
std::string GetTitle() const override
Title of RElement - full file name
Definition RSysFile.hxx:51
std::string GetName() const override
Name of RElement - file name in this case.
Definition RSysFile.cxx:436
static std::string GetFileIcon(const std::string &fname)
Get icon for the type of given file name.
Definition RSysFile.cxx:356
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:466
std::string GetContent(const std::string &kind) override
Returns file content of requested kind.
Definition RSysFile.cxx:499
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 "Files ...
Definition RSysFile.cxx:533
bool MatchName(const std::string &name) const override
Checks if element name match to provided value.
Definition RSysFile.cxx:444
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:571
std::vector< std::string > RElementPath_t
Definition RElement.hxx:20
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...