ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: Design for a file system library
by Peter Dimov other posts by this author
Mar 15 2002 9:06PM messages near this date
RE: [boost] type_traits: workaround bias | Newbie question: using count with a container of boost::shared_ptr
From: Beman Dawes <bdawes@[...]..> 
>  I'll add it (directly or indirectly) when and if someone comes up with an
>  example of a ( real world or not) portable problem that is poorly handled
>  (or not handled at all) by a design that doesn't rely on get/set current
>  directory.

Your objections do not extend to getcwd(), correct? Many functions
implicitly use the current directory, and I don't see what is gained by not
providing a way to query it. If you supply a make_absolute() function (which
is a good idea) it would be trivial to emulate getcwd() anyway.

About setcwd(). Perhaps a good design shouldn't need to use it.
Unfortunately code often interacts with not-so-well designed third-party
libraries. :-) You'll simply force programmers to use the non-portable
equivalent. POSIX provides one:

 The chdir( ) function shall cause the directory named by the path name
pointed to by the path
argument to become the current working directory; that is, the starting
point for path searches
for path names not beginning with '/'.

You can always ignore setcwd() on a platform without directories.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved