Re: (DELETE-FILE open-file-stream)
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 08/10/04
- Next message: Jeff: "Re: Creating my own read table"
- Previous message: Bruce Stephens: "Re: GCL vs. CLISP"
- In reply to: Sam Steingold: "Re: (DELETE-FILE open-file-stream)"
- Next in thread: Christophe Rhodes: "Re: (DELETE-FILE open-file-stream)"
- Reply: Christophe Rhodes: "Re: (DELETE-FILE open-file-stream)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Aug 2004 20:27:36 -0400
In article <u7js8kkig.fsf@gnu.org>, Sam Steingold <sds@gnu.org> wrote:
> > * Barry Margolin <onezne@nyhz.zvg.rqh> [2004-08-09 18:03:41 -0400]:
> >
> > In article <uhdrckp1f.fsf@gnu.org>, Sam Steingold <sds@gnu.org> wrote:
> >
> >> (setq stream (open "foo" :direction :output))
> >> (let ((*default-pathname-defaults* (make-pathname :type "tmp")))
> >> (delete-file stream))
> >> should delete "foo.tmp" and leave the STREAM and "foo" alone, right?
> >
> > I don't think so. If you use a stream as the argument, it operates on
> > the file that the stream is opened to. *DEFAULT-PATHNAME-DEFAULTS* is
> > not used at all in this case, since no filename parsing is being done.
>
> oops! thanks a lot!
>
> Now, how about
>
> (setq stream (open "foo" :direction :output))
>
> and
> (delete-file stream)
> vs
> (delete-file "foo")
> ???
The second will perform pathname defaulting, since that's part of
converting a string to a filename.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Jeff: "Re: Creating my own read table"
- Previous message: Bruce Stephens: "Re: GCL vs. CLISP"
- In reply to: Sam Steingold: "Re: (DELETE-FILE open-file-stream)"
- Next in thread: Christophe Rhodes: "Re: (DELETE-FILE open-file-stream)"
- Reply: Christophe Rhodes: "Re: (DELETE-FILE open-file-stream)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|