Directory Class Reference

[std::vector] for directory entrys More...

#include <directory.h>

List of all members.

Public Member Functions

 Directory (const string &path, bool subdir=false, bool owndir=false)
void scan (const string &path, bool subdir=false, bool owndir=false)
void sort ()
void sort (bool casesensitive)


Detailed Description

[std::vector] for directory entrys

This is a vector to retrieve, store and sort FileName types. No slicing can occure by passing pointers of Directorys, because no additional variables are added at all.

Todo:
excludeflag for hidden files !!
Todo:
maybe use a set rather than a vector, to sort entries this is needed in FileName : bool operator<(const ... & right) const {return mTestOffset > right.mTestOffset;}

Example:
Author:
Fred Klaus


Member Function Documentation

void Directory::scan ( const string &  path,
bool  subdir = false,
bool  owndir = false 
)

void Directory::sort (  ) 

Sorts this vector by filename. If you dont need to change the default behaviour (case insensitive), use this.

Todo:
implement dirsfirst flag

void Directory::sort ( bool  casesensitive  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Is NOT REALLY THREADSAFE because of using a static function in FileName.

Parameters:
casesensitive = Sets whether sorting is case sensitive or not.
See also:
static stk::FileName::setCaseSensitiveCompare


The documentation for this class was generated from the following files:
Generated on Fri Mar 16 21:30:28 2007 for roland.kdevelop by  doxygen 1.5.0