On 14.08.22 02:36, Siri Cruise wrote:
> In article <td8tle$2t77e$
1...@dont-email.me>,
> aotto1968 <
aott...@t-online.de> wrote:
>
>> I think this is useful because TCL is a controlled environment this mean
>> every filehandle was crated by *open* *socket* etcノ
>>
>> → there should be a general *attribute* function or *$FH attribute* method
>
> Every open and socket has to be written by a human who can save
> the information in an array.
>
> It's not a useful idea on unices because there is no good way to
> derive a directory path from a file designator. The directory
> path can be changed and even deleted after an open.
>
I think the problem is *not* well understood
1. every FH in tcl was opened by TCL
2. TCL also knows *how* the FH was opened and has also the *attribute* data
3. the only problem is that the TCL "Tcl-Obj" technology requires that every
object is *string-able* so the attribute data have to be a dict like struct
with *one* attribute is the original (old) FH.
4. other possible attributes are:
a) HOW was the FH created (OPEN, SOCKET, PIPE etc)
b) depend on a) additional attributes are (temporary, filename, mode, ipaddress, hostname, command etc)
mfg