Yate
|
A directory. More...
#include <yatecbase.h>
Public Member Functions | |
ClientDir (const char *name) | |
ClientDir (const ClientDir &other) | |
ObjList & | children () |
bool | updated () const |
void | updated (bool on) |
bool | treeUpdated () const |
ClientDir * | addDir (const String &name) |
ClientDir * | addDirPath (const String &path, const char *sep="/") |
void | copyChildren (const ObjList &list) |
void | addChildren (ObjList &list) |
bool | addChild (ClientFileItem *item) |
ClientFileItem * | findChild (const String &path, const char *sep="/") |
ClientFileItem * | findChildName (const String &name) |
virtual ClientDir * | directory () |
Public Member Functions inherited from ClientFileItem | |
ClientFileItem (const char *name) | |
const String & | name () const |
virtual ClientFile * | file () |
virtual const String & | toString () const |
Public Member Functions inherited from GenObject | |
GenObject () | |
virtual | ~GenObject () |
virtual bool | alive () const |
virtual void | destruct () |
virtual void * | getObject (const String &name) const |
NamedCounter * | getObjCounter () const |
NamedCounter * | setObjCounter (NamedCounter *counter) |
Protected Attributes | |
ObjList | m_children |
bool | m_updated |
Additional Inherited Members | |
Static Public Member Functions inherited from GenObject | |
static void * | getObject (const String &name, const GenObject *obj) |
static bool | getObjCounting () |
static void | setObjCounting (bool enable) |
static NamedCounter * | getObjCounter (const String &name, bool create=true) |
static ObjList & | getObjCounters () |
A directory.
This class holds directory info
|
inline |
Constructor
name | Directory name |
Copy constructor. Copy known children types
other | Source object |
References ClientDir::copyChildren().
bool addChild | ( | ClientFileItem * | item | ) |
Add an item. Remove another item with the same name if exists
item | Item to add |
void addChildren | ( | ObjList & | list | ) |
Add a list of children, consume the objects
list | List of ClientFileItem objects to add |
Build and add a sub-directory if not have one already Replace an existing file with the same name
name | Directory name |
Build sub directories from path
path | Directory path |
sep | Path separator |
|
inline |
Retrieve the children list
void copyChildren | ( | const ObjList & | list | ) |
Add a copy of known children types
list | List of ClientFileItem objects to copy |
Referenced by ClientDir::ClientDir().
|
inlinevirtual |
ClientFileItem* findChild | ( | const String & | path, |
const char * | sep = "/" |
||
) |
|
inline |
Find a child by name
name | Item name |
References ObjList::find(), and ObjList::get().
bool treeUpdated | ( | ) | const |
Recursively check if all (sub)directores were updated
|
inline |
Check if children were updated
|
inline |
Set children updated flag