Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-09-29 12:12:38


Andrei Danaila wrote:
> Hi,
>
> Noob question, how do we rename a file obtained from a
> directory_iterator. i'm attempting to compile the following much
> simplified example.
>
> directory_iterator i("whateverPath");
> i++;
> // i know i++ exists
> rename (i->current_path(), TestRename);
>
> When i try to compile the above , it tells me that i is actually a
> "path" object not a directory iterator.

i->current_path() means (*i).current_path(). Maybe you need
i.current_path()?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net