Boost logo

Boost :

Subject: [boost] [Boost-users] User/Owner Information And in Boost File System
From: MANTOSH KUMAR (mantosh4u_at_[hidden])
Date: 2014-02-12 00:03:08


Hi All,

Point::1
======
boost::filesystem library is great. However I found that boost::filesystem
has no interface to fetch about the owner(userid/groupid) of a particular
file.

"stat()" system call has been provided by POSIX compliance system to fetch
this information. I am pretty sure that this must have been thought by
boost community while designing boost::filesystem library and there would
be valid reason not to provide such interface. However I just wanted to
know the thought of boost community.

Point::2
======
The following is the code snippet:

std::vector<boost::filesystem::path> vec;
boost::filesystem::recursive_directory_iterator rbgnitr(p);
boost::filesystem::recursive_directory_iterator renditr;
for(boost::filesystem::recursive_directory_iterator itr = rbgnitr; itr !=
renditr; ++itr) {
      v.push_back(*itr);
  }

In the above "rbgnitr" does represent the starting node in a directory.
However It looked bit strange while "renditr" for end node(one beyond end).
The end node renditr" is basically empty instance of class
"recursive_directory_iterator"......Just wanted to know why this was
designed in this way.....

Thanks & Regards,
Mantosh Kumar
India


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk