title: Using native() boost path accessors
body: <p>I get this error:</p>
  
  <pre><code>luascript.cpp: In member function ‘bool LuaInterface::loadDirectory(const string&amp;, Npc*, bool)’:
  luascript.cpp:744:69: error: no matching function for call to ‘LuaInterface::loadDirectory(boost::filesystem3::path, Npc*&amp;, bool&amp;)’
  luascript.cpp:744:69: note: candidate is:
  luascript.cpp:736:6: note: bool LuaInterface::loadDirectory(const string&amp;, Npc*, bool)
  luascript.cpp:736:6: note:   no known conversion for argument 1 from ‘boost::filesystem3::path’ to ‘const string&amp; {aka const std::basic_string&lt;char&gt;&amp;}’
  </code></pre>
  
  <p>And this code:</p>
  
  <pre><code>    bool LuaInterface::loadDirectory(const std::string&amp; dir, Npc* npc/* = NULL*/, bool recursively/* = false*/)
  {
      StringVec files;
      for(boost::filesystem::directory_iterator it(dir), end; it != end; ++it)
      {
          std::string s = it-&gt;path().filename().string();
          if(boost::filesystem::is_directory(it-&gt;status()))
          {
              if(recursively &amp;&amp; !loadDirectory(it-&gt;path() / s, npc, recursively))
              return false;
          }
          else if((s.size() &gt; 4 ? s.substr(s.size() - 4) : "") == ".lua")
              files.push_back(s);
      }
  
      std::sort(files.begin(), files.end());
      for(StringVec::iterator it = files.begin(); it != files.end(); ++it)
      {
          if(!loadFile(dir + (*it), npc))
              return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>I changed the first if to be cleaner as someone suggested here but they also told me to use the native() path accesors.</p>