Ports as an argument to file-info in the context of a required chase?/follow?
hga@xxxxxx 26 Aug 2019 18:21 UTC
> From: Lassi Kortela <xxxxxx@lassi.io>
> Date: Monday, August 26, 2019 1:11 PM
>> Lassi and I have I think agreed on that, with Lassi suggesting
>> and my agreeing that file-info should default to chase?/follow?
>> being false.
>> I believe it should not default, but be a required argument. When
>> you ask for file info, you should have to think about what you
>> actually want. That's the C-level status quo: there is no default
>> as between stat() and lstat() ,you have to pick one.
> That's even better.
Agreed, except:
> In C, fstat() for file descriptors is its own function as well.
> Should we simply mirror that in Scheme?
We currently do allow ports and necessarily use fstat. We could
drop ports as a possible argument to file-info, that would make
the SRFI simpler to implement, and eliminate the following issue:
> Currently the chase argument is meaningless for ports.
Which poses a problem if we make it required across the board
(and we should decide RSN if it's going to be chase? or follow?).
We could make it quasi-optional, signaling an error if provided
with a port, or if not provided with a string.
Another option is a new procedure, something like file-port-info....
- Harold