
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:007401c5540f$efec2380$6401a8c0@pdimov2...
Beman Dawes wrote:
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:012701c553ea$c2707610$6401a8c0@pdimov2...
Beman Dawes wrote:
1) Add an other_flag and a matching is_other() function. Change definition of exists() to status() & (directory_flag|file_flag|other_flag)
I should also add that, in my opinion, what you call is_file is probably is_stream. Streams can be read with an ifstream, but they aren't necessarily stable, seekable or finite. Take /dev/urandom, for example.
I agree at least in theory. Although people call these things "files" all the time.
A hypothetical OS that allows directories to be opened with an ifstream may reasonably answer true to both is_stream(p) and is_directory(p). Or maybe not. :-)
I think not. Dividing the world into non-overlapping categories is much easier:-) --Beman