Click here to Skip to main content
15,884,473 members
Articles / Programming Languages / C++

CEnum - File Enumeration and File Globbing Class

Rate me:
Please Sign up or sign in to vote.
4.45/5 (5 votes)
6 Dec 2008CPOL12 min read 52.4K   1.2K   48  
CEnum is used for enumeration of files and directories using wildcard matching (globbing)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>CEnum1: What CEnum is?</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="index.html">A simple manual</a>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="intro1">What <a class="el" href="class_c_enum.html" title="CEnum - File Enumeration and File Globbing Class.">CEnum</a> is? </a></h1><a class="el" href="class_c_enum.html" title="CEnum - File Enumeration and File Globbing Class.">CEnum</a> is a file enumeration class.<br>
 It enumerates (i.e. makes a list of) files (and directories) based on file name. <br>
<br>
 It supports:<ul>
<li>the use of wild card characters * and ? (i.e. its a file globbing class too)</li><li>separate enumeration of files and subdirectories</li><li>separate include list, exclude list and ignore case option for both files and directories</li><li>recursive search (i.e. it can enumerate contest of subdirectories too)</li><li>enumeration either using file's full path or just file name</li><li>written in STL, but it optionally supports MFC collection classes</li><li>UNICODE aware (in MS world UNICODE stands for UTF-16 little-endian)</li><li>works as a wrapper around FindFirstFile and FindNextFile</li></ul>
<p>
Next section <a class="el" href="intro2.html">What CEnum isn't?</a> </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 3 12:45:12 2008 for CEnum1 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Croatia Croatia
Nothing to brag about.
Just another engineer who works as a software developer last couple of years.

Comments and Discussions