Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

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