Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Browsable::RSysDirLevelIter Class Reference

Iterator over files in in sub-directory.

Definition at line 63 of file RSysFile.cxx.

Public Member Functions

 RSysDirLevelIter (const std::string &path="")
 
virtual ~RSysDirLevelIter ()
 
bool CanItemHaveChilds () const override
 Returns true if directory or is file format supported.
 
std::unique_ptr< RItemCreateItem () override
 Create generic description item for RBrowser.
 
bool Find (const std::string &name, int=-1) override
 Find item with specified name Default implementation, should work for all If index specified, not only name but also index should match.
 
std::shared_ptr< RElementGetElement () override
 Returns full information for current element.
 
std::string GetItemName () const override
 Returns current entry name

 
bool Next () override
 Shift to next entry.
 
- Public Member Functions inherited from ROOT::Browsable::RLevelIter
virtual ~RLevelIter ()=default
 

Private Member Functions

void CloseDir ()
 Close directory for listing.
 
std::string FullDirName () const
 Return full dir name with appropriate slash at the end.
 
std::string GetFileExtension (const std::string &fname) const
 
bool NextDirEntry ()
 Trying to produce next entry.
 
bool OpenDir ()
 Open directory for listing.
 
bool TestDirEntry (const std::string &name)
 Check if entry of that name exists.
 

Private Attributes

std::string fCurrentName
 ! current file name
 
FileStat_t fCurrentStat
 ! stat for current file name
 
void * fDir {nullptr}
 ! current directory handle
 
std::string fItemName
 ! current item name
 
std::string fPath
 ! fully qualified path without final slash
 
Inheritance diagram for ROOT::Browsable::RSysDirLevelIter:
[legend]

Constructor & Destructor Documentation

◆ RSysDirLevelIter()

ROOT::Browsable::RSysDirLevelIter::RSysDirLevelIter ( const std::string &  path = "")
inlineexplicit

Definition at line 226 of file RSysFile.cxx.

◆ ~RSysDirLevelIter()

virtual ROOT::Browsable::RSysDirLevelIter::~RSysDirLevelIter ( )
inlinevirtual

Definition at line 228 of file RSysFile.cxx.

Member Function Documentation

◆ CanItemHaveChilds()

bool ROOT::Browsable::RSysDirLevelIter::CanItemHaveChilds ( ) const
inlineoverridevirtual

Returns true if directory or is file format supported.

Reimplemented from ROOT::Browsable::RLevelIter.

Definition at line 245 of file RSysFile.cxx.

◆ CloseDir()

void ROOT::Browsable::RSysDirLevelIter::CloseDir ( )
inlineprivate

Close directory for listing.

Definition at line 127 of file RSysFile.cxx.

◆ CreateItem()

std::unique_ptr< RItem > ROOT::Browsable::RSysDirLevelIter::CreateItem ( )
inlineoverridevirtual

Create generic description item for RBrowser.

Reimplemented from ROOT::Browsable::RLevelIter.

Definition at line 256 of file RSysFile.cxx.

◆ Find()

bool ROOT::Browsable::RSysDirLevelIter::Find ( const std::string &  name,
int  indx = -1 
)
inlineoverridevirtual

Find item with specified name Default implementation, should work for all If index specified, not only name but also index should match.

Reimplemented from ROOT::Browsable::RLevelIter.

Definition at line 232 of file RSysFile.cxx.

◆ FullDirName()

std::string ROOT::Browsable::RSysDirLevelIter::FullDirName ( ) const
inlineprivate

Return full dir name with appropriate slash at the end.

Definition at line 137 of file RSysFile.cxx.

◆ GetElement()

std::shared_ptr< RElement > ROOT::Browsable::RSysDirLevelIter::GetElement ( )
inlineoverridevirtual

Returns full information for current element.

Implements ROOT::Browsable::RLevelIter.

Definition at line 332 of file RSysFile.cxx.

◆ GetFileExtension()

std::string ROOT::Browsable::RSysDirLevelIter::GetFileExtension ( const std::string &  fname) const
inlineprivate

Definition at line 216 of file RSysFile.cxx.

◆ GetItemName()

std::string ROOT::Browsable::RSysDirLevelIter::GetItemName ( ) const
inlineoverridevirtual

Returns current entry name

Implements ROOT::Browsable::RLevelIter.

Definition at line 242 of file RSysFile.cxx.

◆ Next()

bool ROOT::Browsable::RSysDirLevelIter::Next ( )
inlineoverridevirtual

Shift to next entry.

Implements ROOT::Browsable::RLevelIter.

Definition at line 230 of file RSysFile.cxx.

◆ NextDirEntry()

bool ROOT::Browsable::RSysDirLevelIter::NextDirEntry ( )
inlineprivate

Trying to produce next entry.

Definition at line 186 of file RSysFile.cxx.

◆ OpenDir()

bool ROOT::Browsable::RSysDirLevelIter::OpenDir ( )
inlineprivate

Open directory for listing.

Definition at line 71 of file RSysFile.cxx.

◆ TestDirEntry()

bool ROOT::Browsable::RSysDirLevelIter::TestDirEntry ( const std::string &  name)
inlineprivate

Check if entry of that name exists.

Definition at line 151 of file RSysFile.cxx.

Member Data Documentation

◆ fCurrentName

std::string ROOT::Browsable::RSysDirLevelIter::fCurrentName
private

! current file name

Definition at line 66 of file RSysFile.cxx.

◆ fCurrentStat

FileStat_t ROOT::Browsable::RSysDirLevelIter::fCurrentStat
private

! stat for current file name

Definition at line 68 of file RSysFile.cxx.

◆ fDir

void* ROOT::Browsable::RSysDirLevelIter::fDir {nullptr}
private

! current directory handle

Definition at line 65 of file RSysFile.cxx.

◆ fItemName

std::string ROOT::Browsable::RSysDirLevelIter::fItemName
private

! current item name

Definition at line 67 of file RSysFile.cxx.

◆ fPath

std::string ROOT::Browsable::RSysDirLevelIter::fPath
private

! fully qualified path without final slash

Definition at line 64 of file RSysFile.cxx.

  • gui/browsable/src/RSysFile.cxx