MOO-cows Mailing List Archive
[DESIGN/USAGE] Re: fileio vs FUP
Date: Fri, 21 Feb 1997 18:22:28 PST
From: Andrew Bakun <email@example.com>
Content-Type: text/plain; charset="us-ascii"
At 05:26 PM 2/21/97 PST, you wrote:
>There's just one thing I noticed with fileio.. there isn't a function to
>show which handlers are open, is there?
I had noticed this back during the admittedly terse betatesting I
participated in for fileio.
While I think this would be a useful function to have in fileio, you'll
probally be better off using a wrapper $util on the bf's and keeping track
of what you opened in the wrapper. Thing is, a list of open descriptors is
kind of useless because then you could cause a whole bunch of problems with
multiple tasks writing to the same file (you may want this) and you couldn't
use it for housekeeping (ie, closing files that are not being used anymore)
because you don't know what the programmer had in mind as to how they are
using the file. Could store the returned descriptor in a prop, and access a
file in an event based manner, always keeping it open, but there would never
be a task blocking on reading/writing from/to it (like there has to be for
network connections opened from the database (barring hold-input connection
A wrapper utility is best anyway, because since the descriptors are simple
integers, anyone could pass any ol' random integer to one of the fileio
functions and reck havoc with the task which is legitmized to use it. In a
$util wrapper, you could have some kind permissions on each descriptor.
Next time, I'll post in less stream of thought.
Subject Index |