std::vector< std::string >& result,
bool include_dot_names )
{
- // code copied for get_dir_size; keep in sync
+ // code copied to get_dir_count; keep in sync
DIR* dir = ::opendir( path.c_str());
if (!dir)
{
* @param include_dot_names determines if dot-files should be included in the count.
* @return the number of entries in the directory; return -1 in case of error
*/
-int get_dir_size(const std::string& path, bool include_dot_names)
+int get_dir_count(const std::string& path, bool include_dot_names)
{
// code is a simplified copy of get_dir, above. Keep in sync
int result = 0;
bool get_dir(const std::string& path, std::vector< std::string >& result, bool include_dot_names= false );
std::vector< std::string > get_dir(const std::string& path, bool include_dot_names= false );
-int get_dir_size(const std::string& path, bool include_dot_names= false );
+int get_dir_count(const std::string& path, bool include_dot_names= false );
bool unlink(const std::string& path);
BOOST_CHECK_EQUAL( true, res );
BOOST_CHECK( ! names.empty() );
- BOOST_CHECK_EQUAL(I2n::get_dir_size(test_dir), names.size());
+ BOOST_CHECK_EQUAL(I2n::get_dir_count(test_dir), names.size());
BOOST_MESSAGE("Looking for " << basename(__FILE__) << " in " << test_dir);
StringVector::iterator it = std::find( names.begin(), names.end(), basename(__FILE__));
names= get_dir(test_dir,true);
BOOST_CHECK( ! names.empty() );
- BOOST_CHECK_EQUAL(I2n::get_dir_size(test_dir, true), names.size());
+ BOOST_CHECK_EQUAL(I2n::get_dir_count(test_dir, true), names.size());
for (it= names.begin(); it!=names.end(); ++it)
{