From: Tara Matise
Subject: need help with rename-file/delete-file
Date: 
Message-ID: <39A6BA5C.5736946F@biology.rutgers.edu>
comp.lang.lisp:

I have some very old LISP code that uses the delete-file and rename-file
functions.
I have recently upgraded my version of CLISP, for the first time in
several years (oops!).

These 2 functions no longer seem to work the same way they used to.
They are failing with messages that say they cannot operate because the
file stream is still open.  The failure does not seem to be consistent -
they do consistently fail on the same files, but for some of my files
they work and for other files fail, although as far as I know, these
files were all opened and closed in the same manner.

Help!  My program will no longer run, it keeps stopping at points where
it needs to delete files or rename them.

Thanks,

Tara Matise
Rutgers University
······@biology.rutgers.edu
From: Rainer Joswig
Subject: Re: need help with rename-file/delete-file
Date: 
Message-ID: <joswig-C09A7B.22553025082000@news.is-europe.net>
In article <·················@biology.rutgers.edu>, Tara Matise 
<······@biology.rutgers.edu> wrote:

> comp.lang.lisp:
> 
> I have some very old LISP code that uses the delete-file and rename-file
> functions.
> I have recently upgraded my version of CLISP, for the first time in
> several years (oops!).
> 
> These 2 functions no longer seem to work the same way they used to.
> They are failing with messages that say they cannot operate because the
> file stream is still open.  The failure does not seem to be consistent -
> they do consistently fail on the same files, but for some of my files
> they work and for other files fail, although as far as I know, these
> files were all opened and closed in the same manner.

Are these files still open? OPEN-STREAM-P for a stream tells you.
Maybe your Lisp implementation can list you all open streams
for a file (MCL for example has a variable *OPEN-FILE-STREAMS*)?

> Help!  My program will no longer run, it keeps stopping at points where
> it needs to delete files or rename them.

Make sure all streams on your file are closed before you try to
delete the file. See also "WITH-OPEN-FILE".

-- 
Rainer Joswig, Hamburg, Germany
Email: ·············@corporate-world.lisp.de