Boost logo

Boost Users :

Subject: [Boost-users] [filesystem] get relative path from recursive_directory_iterator
From: Ivan Sorokin (sorokin_at_[hidden])
Date: 2011-04-24 16:03:58


I'm using boost::filesystem v3. Currently recursive_directory_iterator
returns absolute path. So the program

for (fs::recursive_directory_iterator it("/home/ivan"); it !=
fs::recursive_directory_iterator(); ++it)
    std::cout << *it << std::endl;

may output


But what I want is something like:


I use function naive_uncomplete described in

fs::path base = "/home/ivan";
for (fs::recursive_directory_iterator it(base); it !=
fs::recursive_directory_iterator(); ++it)
   std::cout << naive_uncomplete(*it, base) << std::endl;

Is there any plans to include this function is boost? Is there any
possibility to get relative paths using only functions from boost?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at