
8 May
2005
8 May
'05
8:37 p.m.
Beman Dawes wrote:
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:012701c553ea$c2707610$6401a8c0@pdimov2...
It seems to me that the correct definition of exists() in terms of status() is just !(status() & not_found_flag).
The expectation with not_found_flag is that, assuming the branch() if any is found, it should be possible to create a file or directory with that path. Consider:
if (!exists("foo")) create_directory("foo"); // surprise! This may fail: "exists but not a directory"
!exists("foo") == !!(status("foo") & not_found_flag) == status("foo") & not_found_flag if( status("foo") & not_found_flag ) { create_directory( "foo" ); } I don't see your point, but I may be missing something.