Martin Stjernholm, Roxen IS @ Pike  developers forum wrote:
>The semantic I think makes sense is that it returns true for anything
>that exists in any way. E.g. if you do get_dir then Stdio.exist would
>return true for all its entries.

>From a UNIX/POSIX standpoint, the current behaviour is expected and sane.
The semantics you want might be reasonable, but are unexpected by
anyone used to UNIX/POSIX semantics.

The Stdio.exist matches the behaviour of:
a. access(2).
b. test -e ...
c. open(2) works (even for directories, on a local filesystem), it
   return ENOENT on a danglink symlink.

So I'd vote against changing it, but perhaps provide an flag for it
to consider a symlink an actual existing object.
-- 
Sincerely,
           Stephen R. van den Berg.
You are currently aboard a fully automated plane.  There is no pilot on board.
Rest assured, you have nothing to worry about... worry about... worry about...
  • Stdio.exist Martin Stjernholm, Roxen IS @ Pike developers forum
    • Stdio.exist Mirar @ Pike developers forum
      • Stdio.exist Martin Stjernholm, Roxen IS @ Pike developers forum
        • Stdio.ex... Mirar @ Pike developers forum
        • Re: Stdi... Stephen R. van den Berg
          • Re: ... Martin Stjernholm, Roxen IS @ Pike developers forum
            • ... Stephen R. van den Berg
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
                • ... Stephen R. van den Berg
                • ... Stephen R. van den Berg
                • ... Martin Bähr
                • ... Martin Stjernholm, Roxen IS @ Pike developers forum
                • ... Mirar @ Pike developers forum
                • ... Martin Stjernholm, Roxen IS @ Pike developers forum
                • ... Mirar @ Pike developers forum

Reply via email to