Cern
LibTmsApi 2.3.0

File system directory class. More...

#include <BDir.h>

Inheritance diagram for BDir:
BList< struct dirent * >

Public Member Functions

 BDir ()
 
 BDir (BString name)
 
 ~BDir ()
 
BError open (BString name)
 Reads named directory.
 
BError error ()
 Current value of error.
 
BError read ()
 read/re-reads directory
 
void clear ()
 Clears list.
 
void setWild (BString wild)
 Set wildcard filter string used on read.
 
void setSort (int on)
 Set alpha sort on/off.
 
BString entryName (BIter i)
 Get filename.
 
struct stat entryStat (BIter i)
 Get file stats.
 
struct stat64 entryStat64 (BIter i)
 Get file stats 64.
 
- Public Member Functions inherited from BList< struct dirent * >
 BList ()
 
 BList (const BList< struct dirent * > &l)
 
virtual ~BList ()
 
void start (BIter &i) const
 Iterator to start of list.
 
BIter begin () const
 Iterator for start of list.
 
BIter end () const
 Iterator for end of list.
 
BIter end (BIter &i) const
 Iterator for end of list.
 
void next (BIter &i) const
 Iterator for next item in list.
 
void prev (BIter &i)
 Iterator for previous item in list.
 
BIter goTo (int pos) const
 Iterator for pos item in list.
 
int position (BIter i)
 Postition in list item with iterator i.
 
unsigned int number () const
 Number of items in list.
 
unsigned int size () const
 Number of items in list.
 
int isEnd (BIter &i) const
 True if iterator refers to last item.
 
struct dirent * & front ()
 Get first item in list.
 
struct dirent * & rear ()
 Get last item in list.
 
struct dirent * & get (BIter i)
 Get item specified by iterator in list.
 
const struct dirent * & get (BIter i) const
 Get item specified by iterator in list.
 
void append (const struct dirent * &item)
 Append item to list.
 
void append (const BList< struct dirent * > &l)
 Append list to list.
 
virtual void insert (BIter &i, const struct dirent * &item)
 Insert item before item.
 
void insertAfter (BIter &i, const struct dirent * &item)
 Insert item after item.
 
virtual void clear ()
 Clear the list.
 
virtual void del (BIter &i)
 Delete specified item.
 
void deleteLast ()
 Delete last item.
 
void deleteFirst ()
 Delete fisrt item.
 
void push (const struct dirent * &i)
 Push item onto list.
 
struct dirent * pop ()
 Pop item from list deleteing item.
 
void queueAdd (const struct dirent * &i)
 Add item to end of list.
 
struct dirent * queueGet ()
 Get item from front of list deleteing item.
 
int has (const struct dirent * &i) const
 Checks if the item is in the list.
 
void swap (BIter i1, BIter i2)
 Swap two items in list.
 
void sort ()
 Sort list based on get(i) values.
 
void sort (SortFunc func)
 Sort list based on Sort func.
 
BList< struct dirent * > & operator= (const BList< struct dirent * > &l)
 
struct dirent * & operator[] (int i)
 
const struct dirent * & operator[] (int i) const
 
struct dirent * & operator[] (BIter i)
 
const struct dirent * & operator[] (const BIter &i) const
 
BList< struct dirent * > operator+ (const BList< struct dirent * > &l) const
 

Private Attributes

BError oerror
 
BString odirname
 
BString owild
 
int osort
 

Additional Inherited Members

- Public Types inherited from BList< struct dirent * >
typedef int(* SortFunc) (struct dirent * &a, struct dirent * &b)
 Prototype for sorting function.
 
- Protected Member Functions inherited from BList< struct dirent * >
virtual Node * nodeGet (BIter i)
 
virtual const Node * nodeGet (BIter i) const
 
virtual Node * nodeCreate (const struct dirent * &item)
 
- Protected Attributes inherited from BList< struct dirent * >
Node * onodes
 
unsigned int olength
 

Detailed Description

File system directory class.

Constructor & Destructor Documentation

◆ BDir() [1/2]

BDir::BDir ( )

◆ BDir() [2/2]

BDir::BDir ( BString  name)

◆ ~BDir()

BDir::~BDir ( )

Member Function Documentation

◆ clear()

void BDir::clear ( )
virtual

Clears list.

Reimplemented from BList< struct dirent * >.

◆ entryName()

BString BDir::entryName ( BIter  i)

Get filename.

◆ entryStat()

struct stat BDir::entryStat ( BIter  i)

Get file stats.

◆ entryStat64()

struct stat64 BDir::entryStat64 ( BIter  i)

Get file stats 64.

◆ error()

BError BDir::error ( )

Current value of error.

◆ open()

BError BDir::open ( BString  name)

Reads named directory.

◆ read()

BError BDir::read ( )

read/re-reads directory

◆ setSort()

void BDir::setSort ( int  on)

Set alpha sort on/off.

◆ setWild()

void BDir::setWild ( BString  wild)

Set wildcard filter string used on read.

Member Data Documentation

◆ odirname

BString BDir::odirname
private

◆ oerror

BError BDir::oerror
private

◆ osort

int BDir::osort
private

◆ owild

BString BDir::owild
private

The documentation for this class was generated from the following files:
  • /src/cern/tms/tms/beam/libBeam/BDir.h
  • /src/cern/tms/tms/beam/libBeam/BDir.cpp