38 for (x = 0; x < directories.size (); x++)
39 delete directories[x];
49 EntryTable::const_iterator existingIdx;
50 DuplicateTable::iterator dupIdx;
52 KKStrPtr dirPath =
new KKStr (_subDir
);
54 directories.push_back (dirPath);
63 KKStrPtr fileName = NULL;
65 KKStrList::iterator fIDX;
67 for (fIDX = files->begin (); fIDX != files->end (); ++fIDX)
72 existingIdx = entries.find (*fileName);
73 if (existingIdx != entries.end ())
75 dupIdx = duplicates.find (*fileName);
76 if (dupIdx == duplicates.end ())
77 duplicates.insert (pair<KKStr, kkint32> (*fileName, 2));
82 entries.insert (pair<KKStr, KKStrPtr> (*fileName, dirPath));
95 KKStrPtr subDirName = NULL;
96 KKStrList::iterator dIDX;
97 for (dIDX = dirs->begin (); dIDX != dirs->end (); ++dIDX)
100 if ((*subDirName
== ".") || (*subDirName
== ".."))
103 Load (*dirPath
+ *subDirName);
118 EntryTable::const_iterator p;
120 p = entries.find (fileName);
121 if (p == entries.end ())
124 if (p->first == fileName)
135 EntryTable::const_iterator p;
136 p = entries.find (fileName);
137 if (p == entries.end ())
141 while (p != entries.end ())
143 if (p->first != fileName)
145 dirList->PushOnBack (
new KKStr ((*p->second)));
bool osValidDirectory(const KKStr &_name)
bool operator==(const char *rtStr) const
Creates a index of all images in a specified directory structure.
KKStrListPtr osGetListOfFiles(const KKStr &fileSpec)
Returns a list of files that match the provided file specification.
bool SupportedImageFileFormat(const KKStr &imageFileName)
unsigned __int32 kkuint32
KKStr(const KKStr &str)
Copy Constructor.
KKStrConstPtr LocateImage(const KKStr &fileName)
Locate image specified by 'fileName' and return the directory where it is located.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
KKStr operator+(const KKStr &right) const
KKStrListPtr osGetListOfDirectories(KKStr fileSpec)
ImageDirTree(KKStr _subDir)
Construct a Index of images for a specified SubDirectory structure. details Given a specified directo...
KKStrListPtr Directories(const KKStr &fileName) const
Returns list of directories that 'fileName' occurs in.
void osAddLastSlash(KKStr &fileSpec)
Will add the appropriate Directory separator character to the end of fileSpec if one is not there alr...