Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #8996
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Subject | Re: C++ and directories |
| Date | 2011-08-17 18:11 +0100 |
| Message-Id | <pan.2011.08.17.17.11.00.83000@nowhere.com> |
| Newsgroups | comp.lang.c++ |
| References | <_8j2q.43956$nj1.56@newsfe19.iad> <pan.2011.08.16.10.57.57.450000@nowhere.com> <4e4a57af$0$3063$7b1e8fa0@news.nbl.fi> <pan.2011.08.17.12.09.54.512000@nowhere.com> <4e4bbbea$0$4367$7b1e8fa0@news.nbl.fi> |
| Organization | Zen Internet |
On Wed, 17 Aug 2011 13:02:34 +0000, Juha Nieminen wrote: >>> Anyways, is there a reason why the C++ standard couldn't include a >>> library similar to boost::filesystem? >> >> A third-party library has more leeway. It's up to the third-party >> developer whether "it sort-of works, on common platforms" is good enough. >> If e.g. an OS vendor complains that the interface is a poor match for >> their OS's filesystem semantics, the boost developers can just say >> "tough luck". But the ISO standardisation process is rather more involved. > > Not everything even in the current standard is something that *must* > work on every system in existence. > > For example, where does the output of std::cout (or printf from that > matter) go? It doesn't have to "go" anywhere. An implementation can discard anything written to cout/cerr and consider cin as being initially at EOF. However, on most platforms which actually have files, there's enough commonality to make it worth defining a basic interface. Even on systems which don't have files, stringstream still works. > I think a file system library is feasible even for the C++ standard, > especially if it includes means to check that the target architecture > has proper support. Unlike streams, filesystems differ greatly in their semantics. E.g. single root (Unix) versus multiple drives and UNC paths (Windows), the types of object which can exist on a filesystem, whether links are supported and whether they're transparent (hard links) or a distinct type (symbolic links), whether filenames are composed of bytes (Unix) or characters (Windows), whether filenames are case-sensitive, whether a file can be renamed or deleted while it is open, what information is stored about a file, whether files are versioned (VMS), ... The differences just between Unix and Windows are enough that even fairly trivial cases end up requiring #ifdef'd code to handle the differences. And once you move beyond the most common platforms, you're usually on your own.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C++ and directories "Edward Hvarregaard" <edwardh@shaw.ca> - 2011-08-15 17:49 -0700
Re: C++ and directories Ian Collins <ian-news@hotmail.com> - 2011-08-16 12:55 +1200
Re: C++ and directories jt@toerring.de (Jens Thoms Toerring) - 2011-08-16 11:15 +0000
Re: C++ and directories Nobody <nobody@nowhere.com> - 2011-08-16 11:57 +0100
Re: C++ and directories Juha Nieminen <nospam@thanks.invalid> - 2011-08-16 11:42 +0000
Re: C++ and directories Marc <marc.glisse@gmail.com> - 2011-08-16 11:49 +0000
Re: C++ and directories jt@toerring.de (Jens Thoms Toerring) - 2011-08-16 11:58 +0000
Re: C++ and directories Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-08-16 16:02 +0000
Re: C++ and directories Nobody <nobody@nowhere.com> - 2011-08-17 13:09 +0100
Re: C++ and directories Juha Nieminen <nospam@thanks.invalid> - 2011-08-17 13:02 +0000
Re: C++ and directories Nobody <nobody@nowhere.com> - 2011-08-17 18:11 +0100
Re: C++ and directories "Paul" <pchristor@yahoo.co.uk> - 2011-08-18 20:38 +0100
Re: C++ and directories Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-08-23 01:03 -0700
Re: C++ and directories Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-08-23 01:06 -0700
Re: C++ and directories Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-08-16 15:24 +0000
Re: C++ and directories "Bo Persson" <bop@gmb.dk> - 2011-08-17 12:39 +0200
Re: C++ and directories Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-08-17 11:39 +0000
Re: C++ and directories "Edward Hvarregaard" <edwardh@shaw.ca> - 2011-08-22 10:06 -0700
csiph-web