[m-rev.] io.m latest full diff

Ralph Becket rafe at cs.mu.OZ.AU
Thu Jan 22 11:35:52 AEDT 2004


Fergus Henderson, Wednesday, 21 January 2004:
> On 21-Jan-2004, James Goddard <goddardjames at yahoo.com> wrote:
> > +++ io.m	21 Jan 2004 04:52:26 -0000
> > @@ -1168,6 +1168,11 @@
> >       % io__make_temp(Name, IO0, IO) creates an empty file
> >       % whose name which is different to the name of any existing file.
> >       % Name is bound to the name of the file.
> >       % On Microsoft Windows systems, the file will reside in the current
> >       % directory if the TMP environment variable is not set, or in the
> >       % directory specified by TMP if it is set.
> >  	% On other systems, the file will reside in /tmp if the TMPDIR
> >  	% environment variable is not set, or in the directory specified
> >  	% by TMPDIR if it is set.
> > +	% For the Java implementation, the system-dependent default
> > +	% temporary-file directory will be used, specified by the system
> > +	% property java.io.tmpdir. On UNIX systems the default value of this
> > +	% property is typically "/tmp" or "/var/tmp"; on Microsoft Windows
> > +	% systems it is typically "c:\\temp". 
> >  	% It is the responsibility of the program to delete the file
> >  	% when it is no longer needed.
> 
> I suggest the following:
> 
> 	% io__make_temp(Name, IO0, IO) creates an empty file
> 	% whose name which is different to the name of any existing file.
> [...]

I'm slightly worried about the interface to this predicate: can't the
operation fail?  Or do we worry about that when we try to open it?
Another issue is whether it should actually open the file for us.  Is it
guaranteed that you can open a file immediately after creating it or is
there a race condition on some OSs?

-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list