Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 5198

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>mrpt::system::CDirectoryExplorer Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacemrpt.html">mrpt</a>      </li>
      <li class="navelem"><a class="el" href="namespacemrpt_1_1system.html">system</a>      </li>
      <li class="navelem"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html">CDirectoryExplorer</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">mrpt::system::CDirectoryExplorer Class Reference<div class="ingroups"><a class="el" href="group__mrpt__base__grp.html">[mrpt-base]</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="mrpt::system::CDirectoryExplorer" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class allows the enumeration of the files/directories that exist into a given path. </p>
<p>The only existing method is "explore" and returns the list of found files &amp; directories. Refer to the example in /samples/UTILS/directoryExplorer</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1system_1_1_c_file_system_watcher.html" title="This class subscribes to notifications of file system changes, thus it can be used to efficiently sta...">CFileSystemWatcher</a> </dd></dl>
</div>
<p><code>#include &lt;<a class="el" href="_c_directory_explorer_8h_source.html">mrpt/system/CDirectoryExplorer.h</a>&gt;</code></p>

<p><a href="classmrpt_1_1system_1_1_c_directory_explorer-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrpt_1_1system_1_1_c_directory_explorer_1_1_t_file_info.html">TFileInfo</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This represents the information about each file.  <a href="structmrpt_1_1system_1_1_c_directory_explorer_1_1_t_file_info.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classstd_1_1deque.html">std::deque</a>&lt; <a class="el" href="structmrpt_1_1system_1_1_c_directory_explorer_1_1_t_file_info.html">TFileInfo</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The list type used in "explore".  <a href="#a03004d306573d43603813523e822a36a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#aa4b37b8feb516157aa9691db662e82d1">explore</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;path, const unsigned long mask, <a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;outList)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The path of the directory to examine must be passed to this constructor, among the According to the following parameters, the object will collect the list of files, which can be modified later through other methods in this class.  <a href="#aa4b37b8feb516157aa9691db662e82d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#af92547a7064c54417bde3266b37ecd8d">sortByName</a> (<a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;lstFiles, bool ascendingOrder=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort the file entries by name, in ascending or descending order.  <a href="#af92547a7064c54417bde3266b37ecd8d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a25d62ee8baf3d0cfa2aa07159c4a5436">filterByExtension</a> (<a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;lstFiles, const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;extension)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove from the list of files those whose extension does not coincide (without case) with the given one.  <a href="#a25d62ee8baf3d0cfa2aa07159c4a5436"></a><br/></td></tr>
</table>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a03004d306573d43603813523e822a36a"></a><!-- doxytag: member="mrpt::system::CDirectoryExplorer::TFileInfoList" ref="a03004d306573d43603813523e822a36a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classstd_1_1deque.html">std::deque</a>&lt;<a class="el" href="structmrpt_1_1system_1_1_c_directory_explorer_1_1_t_file_info.html">TFileInfo</a>&gt; <a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">mrpt::system::CDirectoryExplorer::TFileInfoList</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The list type used in "explore". </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#aa4b37b8feb516157aa9691db662e82d1" title="The path of the directory to examine must be passed to this constructor, among the According to the f...">explore</a> </dd></dl>

<p>Definition at line <a class="el" href="_c_directory_explorer_8h_source.html#l00081">81</a> of file <a class="el" href="_c_directory_explorer_8h_source.html">CDirectoryExplorer.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa4b37b8feb516157aa9691db662e82d1"></a><!-- doxytag: member="mrpt::system::CDirectoryExplorer::explore" ref="aa4b37b8feb516157aa9691db662e82d1" args="(const std::string &amp;path, const unsigned long mask, TFileInfoList &amp;outList)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void mrpt::system::CDirectoryExplorer::explore </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned long&#160;</td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;&#160;</td>
          <td class="paramname"><em>outList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The path of the directory to examine must be passed to this constructor, among the According to the following parameters, the object will collect the list of files, which can be modified later through other methods in this class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>The path to examine (IT MUST BE A DIRECTORY), e.g "d:\temp\", or "/usr/include/" </td></tr>
    <tr><td class="paramname">mask</td><td>One or the OR'ed combination of the values "FILE_ATTRIB_ARCHIVE" and "FILE_ATTRIB_DIRECTORY", depending on what file types do you want in the list (These values are platform-independent). </td></tr>
    <tr><td class="paramname">outList</td><td>The list of found files/directories is stored here. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#af92547a7064c54417bde3266b37ecd8d" title="Sort the file entries by name, in ascending or descending order.">sortByName</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a25d62ee8baf3d0cfa2aa07159c4a5436"></a><!-- doxytag: member="mrpt::system::CDirectoryExplorer::filterByExtension" ref="a25d62ee8baf3d0cfa2aa07159c4a5436" args="(TFileInfoList &amp;lstFiles, const std::string &amp;extension)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void mrpt::system::CDirectoryExplorer::filterByExtension </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;&#160;</td>
          <td class="paramname"><em>lstFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>extension</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove from the list of files those whose extension does not coincide (without case) with the given one. </p>
<p>Example: filterByExtension(lst,"txt"); </p>

</div>
</div>
<a class="anchor" id="af92547a7064c54417bde3266b37ecd8d"></a><!-- doxytag: member="mrpt::system::CDirectoryExplorer::sortByName" ref="af92547a7064c54417bde3266b37ecd8d" args="(TFileInfoList &amp;lstFiles, bool ascendingOrder=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void mrpt::system::CDirectoryExplorer::sortByName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1system_1_1_c_directory_explorer.html#a03004d306573d43603813523e822a36a">TFileInfoList</a> &amp;&#160;</td>
          <td class="paramname"><em>lstFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>ascendingOrder</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sort the file entries by name, in ascending or descending order. </p>

</div>
</div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>