File indexing completed on 2025-01-18 10:10:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_Browsable_RSysFile
0010 #define ROOT7_Browsable_RSysFile
0011
0012 #include <ROOT/Browsable/RElement.hxx>
0013 #include <ROOT/Browsable/RGroup.hxx>
0014
0015 #include "TSystem.h"
0016 #include <string>
0017
0018 namespace ROOT {
0019 namespace Browsable {
0020
0021 class RSysDirLevelIter;
0022
0023
0024
0025
0026
0027 class RSysFile : public RElement {
0028
0029 friend class RSysDirLevelIter;
0030
0031 FileStat_t fStat;
0032 std::string fDirName;
0033 std::string fFileName;
0034
0035 std::string GetFullName() const;
0036
0037 public:
0038 RSysFile(const std::string &filename);
0039
0040 RSysFile(const FileStat_t& stat, const std::string &dirname, const std::string &filename);
0041
0042 virtual ~RSysFile() = default;
0043
0044
0045 std::string GetName() const override;
0046
0047
0048 bool MatchName(const std::string &name) const override;
0049
0050
0051 std::string GetTitle() const override { return GetFullName(); }
0052
0053 std::unique_ptr<RLevelIter> GetChildsIter() override;
0054
0055 std::string GetContent(const std::string &kind) override;
0056
0057 EActionKind GetDefaultAction() const override;
0058
0059 static std::string GetFileIcon(const std::string &fname);
0060
0061 static RElementPath_t ProvideTopEntries(std::shared_ptr<RGroup> &comp, const std::string &workdir = "");
0062
0063 static RElementPath_t GetWorkingPath(const std::string &workdir = "");
0064
0065 };
0066
0067 }
0068 }
0069
0070
0071 #endif