From: Jeff Garland (jeff_at_[hidden])
Date: 2002-03-20 17:04:37
> >int main()
> > std::string initial = getcwd();
> >// rest unchanged
> There would be no difference at all at that point in the code. But if
> initial_directory() is called again later by some library routine, it still
> will give the correct answer. Eventually initial_directory() might become
> part of the standard, and then would be set by the runtime library before
> main() runs.
> If anyone comes up with a killer argument for get/set cwd, we can include
> them. But that hasn't happened so far.
How about this -- I need to spawn a process and I need it to start with a
certain initial directory. For that I would need setcwd. Can't think of a real
need for getcwd b/c it is really initial_directory() that matters. And of course
the fatal flaw to this argument is there isn't a portable library to spawn a
process, but we can always hope....
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk