9#ifndef ROOT7_Browsable_RSysFile
10#define ROOT7_Browsable_RSysFile
38 RSysFile(
const std::string &filename);
40 RSysFile(
const FileStat_t& stat,
const std::string &dirname,
const std::string &filename);
45 std::string
GetName()
const override;
55 std::string
GetContent(
const std::string &kind)
override;
59 static std::string
GetFileIcon(
const std::string &fname);
Basic element of browsable hierarchy.
EActionKind
Possible actions on double-click.
Iterator over files in in sub-directory.
std::string GetFullName() const
Returns full file name - including fully qualified path.
std::unique_ptr< RLevelIter > GetChildsIter() override
Returns iterator for files in directory.
std::string fDirName
! fully-qualified directory name
virtual ~RSysFile()=default
FileStat_t fStat
! file stat object
RSysFile(const std::string &filename)
Create file element.
std::string GetTitle() const override
Title of RElement - full file name.
std::string GetName() const override
Name of RElement - file name in this case.
static std::string GetFileIcon(const std::string &fname)
Get icon for the type of given file name.
friend class RSysDirLevelIter
EActionKind GetDefaultAction() const override
Get default action for the file Either start text editor or image viewer or just do file browsing.
std::string GetContent(const std::string &kind) override
Returns file content of requested kind.
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...
bool MatchName(const std::string &name) const override
Checks if element name match to provided value.
std::string fFileName
! file name in current dir
static RElementPath_t GetWorkingPath(const std::string &workdir="")
Return working path in browser hierarchy.
std::vector< std::string > RElementPath_t